{"id":51034059,"url":"https://github.com/andrealeone/cti","last_synced_at":"2026-06-22T03:31:06.906Z","repository":{"id":365981056,"uuid":"1274536643","full_name":"andrealeone/cti","owner":"andrealeone","description":"Concise Terminal Interface Framework","archived":false,"fork":false,"pushed_at":"2026-06-20T09:57:54.000Z","size":155,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-20T11:05:26.449Z","etag":null,"topics":["cli","framework"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrealeone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":null,"dco":null,"cla":null}},"created_at":"2026-06-19T16:05:34.000Z","updated_at":"2026-06-20T09:57:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/andrealeone/cti","commit_stats":null,"previous_names":["andrealeone/watson","andrealeone/cti"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/andrealeone/cti","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrealeone%2Fcti","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrealeone%2Fcti/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrealeone%2Fcti/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrealeone%2Fcti/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrealeone","download_url":"https://codeload.github.com/andrealeone/cti/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrealeone%2Fcti/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34633796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"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":["cli","framework"],"created_at":"2026-06-22T03:31:06.831Z","updated_at":"2026-06-22T03:31:06.898Z","avatar_url":"https://github.com/andrealeone.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eCTI\u003c/h1\u003e\n\nCTI (**Concise Terminal Interface**, codename Watson) is a lightweight, dependency-free, Bun-native TypeScript framework for building command-line tools. Install it as a dependency, call it once from your entrypoint, and start writing command files. CTI discovers them, parses their arguments, routes to them, and renders their output.\n\n\u003cbr/\u003e\n\n### Vision\n\nInstalling a CLI framework should feel like installing Next.js, not like copying a starter kit. You install CTI, write an entrypoint that's one line long, drop files into a `commands` directory, and you have a working, typed, compilable CLI. Everything between the argument vector and your handler is CTI's job, not yours.\n\nThere are no configuration files to maintain and no wiring code to write. The framework handles the plumbing, so the developer writes only what each command does.\n\n\u003cbr/\u003e\n\n### Features\n\n- **No Boilerplate** No manual imports or routing logic, just files in a `commands` directory.\n- **Typed Arguments** Flags and positionals are declared once and arrive in your handler already parsed, coerced, and typed.\n- **Zero-Config**: CTI reads your `package.json` and discovers commands from the filesystem; nothing to wire up by hand.\n- **Lightweight** No runtime dependencies; the framework is the only thing in your `node_modules` that's CTI.\n- **Bun-Optimised** Lean on Bun's speed and native TypeScript.\n- **Compiles to Binary** Ship your CLI as a single standalone executable with `bun build --compile`.\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n## Getting Started\n\nRequires [Bun](https://bun.sh) 1.3 or later.\n\n```bash\nmkdir new-cli \u0026\u0026 cd new-cli\n\nbun init -y\nbun install\n```\n\nYou only ever touch two kinds of files: the entrypoint, written once, and command\nfiles, dropped in as your CLI grows:\n\n```\nnew-cli/\n├── main.ts      ← written once, never touched again\n└── commands/\n    └── fib.ts   ← app fib\n```\n\nCreate `commands/fib.ts`:\n\n```typescript\nimport { command } from './core/command'\n\nexport default command({\n  meta: { description: 'Compute a Fibonacci number, or the sequence leading to it' },\n  flags: {\n    sequence: { type: 'boolean', short: 's', description: 'Print the whole sequence up to n' },\n  },\n  run(ctx) {\n    const n = Number(ctx.positionals[0] ?? 10),\n      sequence = ctx.flags.sequence === true,\n      values = [0, 1]\n\n    for (let i = 2; i \u003c= n; i++) values.push(values[i - 1] + values[i - 2])\n\n    ctx.io.write(sequence ? values.slice(0, n + 1).join(', ') : String(values[n]))\n  },\n})\n```\n\nThe `flags` block is enough to get a typed, validated `--sequence` toggle\nin `ctx.flags`. No manual parsing, no wiring it into a parser yourself.\n\nCreate `main.ts`:\n\n```typescript\nimport { run } from 'cti'\nimport type { Config } from 'cti'\n\nconst config: Config = {\n  name: 'new-cli',\n  version: '1.0.0',\n}\n\nvoid run(config, import.meta)\n```\n\nThat's the whole entrypoint, and it's the last time you'll edit it. CTI automatically\ndiscovers commands from the `commands` directory, turns `fib.ts` into the `fib` route,\nparses argv against its declared flags, and dispatches — automatically, on every run.\nAdd a second file and `app second-command` exists with no further wiring. See\n[Command Routing](docs/features/command-routing.md) for how the file\nstructure maps to commands. Prefer to list commands by hand instead of\nrelying on the filesystem? See\n[Manifest Definition](docs/features/manifest-definition.md) for the inline\n`defineManifest` alternative.\n\nRun it:\n\n```bash\nbun run ./main.ts fib 10\n# Output: 55\n\nbun run ./main.ts fib 10 --sequence\n# Output: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55\n```\n\nCompile it to a standalone binary:\n\n```bash\nbun build ./main.ts --compile --outfile dist/my-cli\n./dist/my-cli fib 10 --sequence\n```\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n## Documentation\n\nThe example above is just a taste. CTI has comprehensive documentation covering everything from first steps to advanced patterns. Here's where to go.\n\n**New to CTI?**  \nStart with the [Quick Start guide](docs/getting-started/quickstart.md) for a five-minute tour, or read [Core Concepts](docs/concepts/core-concepts.md) to understand the mental model.\n\n**Ready to build something?**  \nHead to [Building Commands](docs/guides/building-commands.md) for practical patterns, browse [Examples](docs/guides/examples.md) for real-world snippets, or run the [runnable demos](docs/guides/demos.md) in [`/demos`](demos) to see CTI in action.\n\n**Understanding the design**  \nExplore [System Overview](docs/architecture/system-design.md) to see how the pieces fit together, then dive into specific modules: [Core](docs/architecture/core.md) (routing and argument parsing), [I/O System](docs/architecture/io.md) (colours, prompts, spinners), [Type System](docs/architecture/types.md) (strong typing), and [Utilities](docs/architecture/utils.md).\n\n**Why these choices?**  \n[Value Proposition](docs/principles/value-proposition.md) explains what makes CTI worth your time, and [Philosophy](docs/principles/philosophy.md) compares it to other frameworks.\n\n**Contributing \u0026 roadmap**  \n[Contribution Guide](docs/contributing/guide.md) covers the development workflow, [Testing](docs/contributing/testing.md) explains the test structure, and [Roadmap](docs/future/roadmap.md) shows where CTI is heading.\n\n**Full reference**  \nSee the [API Reference](docs/reference/api-reference.md) for type definitions and exports.\n\n\u003cbr/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrealeone%2Fcti","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrealeone%2Fcti","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrealeone%2Fcti/lists"}