{"id":30806535,"url":"https://github.com/0xtbug/basa","last_synced_at":"2025-09-06T01:11:54.091Z","repository":{"id":312772874,"uuid":"1048708438","full_name":"0xtbug/basa","owner":"0xtbug","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-01T23:10:58.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-01T23:31:49.684Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xtbug.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-09-01T22:40:24.000Z","updated_at":"2025-09-01T23:11:01.000Z","dependencies_parsed_at":"2025-09-01T23:31:52.359Z","dependency_job_id":"da537af6-3648-4b0a-8b4c-e1cf8d4c8557","html_url":"https://github.com/0xtbug/basa","commit_stats":null,"previous_names":["0xtbug/basa"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/0xtbug/basa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtbug%2Fbasa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtbug%2Fbasa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtbug%2Fbasa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtbug%2Fbasa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xtbug","download_url":"https://codeload.github.com/0xtbug/basa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtbug%2Fbasa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273843484,"owners_count":25178059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-06T01:11:49.473Z","updated_at":"2025-09-06T01:11:54.083Z","avatar_url":"https://github.com/0xtbug.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basa (ᮘᮞ)\n\u003e _In Sundanese, Basa (ᮘᮞ) means “language.”_\n\n\u003cimg src=\"https://github.com/user-attachments/assets/b4aad845-197b-40fa-bb2a-cf989289dea4\" width=\"800px\" /\u003e\n\nAI-powered Markdown translator using Google Gemini. Basa translates `.md`/`.mdx` (and common markdown variants) while preserving formatting, code blocks, and links. It can process single or multiple files and writes outputs with a clear naming pattern.\n\n## Install\n- Global: `npm i -g @0xtbug/basa`\n- Node: `\u003e= 16`\n\n## Usage\n```\nbasa [files...] -l \u003clanguage\u003e -k \u003cAPI_KEY\u003e\n```\n- Input: `.md`, `.mdx`, `.markdown`, `.mdown`, `.mkdn`, `.mdtxt`, `.mdtext`, `.txt`\n\nNotes\n- `-o/--output` is optional.\n  - Single file: if omitted, the translated file is written next to the input file.\n  - Multiple files: if omitted, each translated file is written next to its source; if provided, treat `-o` as an output directory.\n\nExamples\n- Single file: `basa sample.mdx -l fr -k \"$GEMINI_API_KEY\"`\n- Multiple files (positional): `basa a.mdx b.md -l id -k \"$GEMINI_API_KEY\" -o out/`\n- With flags: `basa -f a.mdx -f b.md -l zh -k \"$GEMINI_API_KEY\"`\n- Multiple languages (space-separated): `basa sample.mdx -l zh id th in -k \"$GEMINI_API_KEY\"`\n- Multiple languages (comma-separated): `basa sample.mdx -l zh,id,th,in -k \"$GEMINI_API_KEY\"`\n\nRun `basa --help` for full options.\n\n## Development\n- Clone: `git clone https://github.com/0xtbug/basa`\n- Install deps: `npm install`\n- Dev CLI: `npm run dev -f sample.mdx -l fr -k \"\u003cAPI_KEY\u003e\"`\n- Build: `npm run build`\n- Local link: `npm run build \u0026\u0026 npm link` then run `basa ...`\n\n## Testing\n- Run tests: `npm test`\n- Coverage: `npm run coverage`\n\n## Project Structure\n- `src/cli/`: CLI (yargs) entry and parsing\n- `src/core/`: Translator orchestration\n- `src/services/`: AI adapter (Gemini)\n- `src/utils/`: File/language/loading helpers\n- `src/constants/` and `src/types/`\n\n## Contributing\nPlease read Repository Guidelines in `AGENTS.md` for coding style, test conventions, and PR requirements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtbug%2Fbasa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xtbug%2Fbasa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtbug%2Fbasa/lists"}