terminal-jarvis 0.0.2 β†’ 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,226 @@
1
+ # Terminal Jarvis
2
+
3
+ [![NPM Version](https://img.shields.io/npm/v/terminal-jarvis.svg)](https://www.npmjs.com/package/terminal-jarvis)
4
+ [![NPM Downloads](https://img.shields.io/npm/dm/terminal-jarvis.svg)](https://www.npmjs.com/package/terminal-jarvis)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ A thin Rust wrapper that provides a unified interface for managing and running AI coding tools. In the midst of all the tools out there that you can possibly use to keep track of them, here's a "shovel" that just works to try them all out.
8
+
9
+ πŸŽ‰ **Now available on NPM!** Get started instantly with `npx terminal-jarvis`
10
+
11
+ ## Quick Start
12
+
13
+ ```bash
14
+ # Try it instantly with npx (no installation required)
15
+ npx terminal-jarvis
16
+
17
+ # Or install globally
18
+ npm install -g terminal-jarvis
19
+ ```
20
+
21
+ > **Note**: The current NPM version (0.0.1) is a preview release. Full binary functionality will be available in upcoming releases through automated GitHub Actions builds for multiple platforms.
22
+
23
+ ## Features
24
+
25
+ Terminal Jarvis serves as a command-line orchestrator for various AI coding tools, providing:
26
+
27
+ - **Unified Interface**: Single CLI to manage multiple AI coding tools
28
+ - **Built-in Tool Support**:
29
+ - `claude-code`
30
+ - `gemini-cli`
31
+ - `qwen-code`
32
+ - `opencode`
33
+ - **Extensible Architecture**: Easy addition of new CLI tools
34
+ - **Package Management**:
35
+ - Update all packages at once
36
+ - Update specific packages individually
37
+ - Run individual packages with custom arguments
38
+ - **Template Management**: Create and maintain your own GitHub repository for agent templates (requires `gh` CLI and user consent)
39
+
40
+ ## Installation
41
+
42
+ ### NPM (Recommended)
43
+
44
+ ```bash
45
+ # Install globally via NPM
46
+ npm install -g terminal-jarvis
47
+
48
+ # Or run directly with npx (no installation required)
49
+ npx terminal-jarvis
50
+ ```
51
+
52
+ ### From Source
53
+
54
+ ```bash
55
+ # Clone the repository
56
+ git clone https://github.com/BA-CalderonMorales/terminal-jarvis.git
57
+ cd terminal-jarvis
58
+
59
+ # Build the project
60
+ cargo build --release
61
+
62
+ # Install globally (optional)
63
+ cargo install --path .
64
+ ```
65
+
66
+ ## Usage
67
+
68
+ ### Basic Commands
69
+
70
+ ```bash
71
+ # Run a specific tool
72
+ terminal-jarvis run claude-code --prompt "Refactor this function"
73
+ terminal-jarvis run gemini-cli --file src/main.rs
74
+ terminal-jarvis run qwen-code --analyze
75
+ terminal-jarvis run opencode --generate
76
+
77
+ # Update packages
78
+ terminal-jarvis update # Update all packages
79
+ terminal-jarvis update claude-code # Update specific package
80
+
81
+ # List available tools
82
+ terminal-jarvis list
83
+
84
+ # Show tool information
85
+ terminal-jarvis info claude-code
86
+ ```
87
+
88
+ ### Template Management
89
+
90
+ ```bash
91
+ # Initialize template repository (requires gh CLI)
92
+ terminal-jarvis templates init
93
+
94
+ # Create a new template
95
+ terminal-jarvis templates create my-template
96
+
97
+ # List available templates
98
+ terminal-jarvis templates list
99
+
100
+ # Use a template
101
+ terminal-jarvis templates apply my-template
102
+ ```
103
+
104
+ ## Project Structure
105
+
106
+ The project follows a modular architecture designed for maintainability and extensibility:
107
+
108
+ ```
109
+ src/
110
+ β”œβ”€β”€ main.rs # Entry point - minimal code, delegates to CLI
111
+ β”œβ”€β”€ cli.rs # Clean, expressive CLI interface definitions
112
+ β”œβ”€β”€ cli_logic.rs # Business logic separated from CLI implementation
113
+ β”œβ”€β”€ services.rs # Service layer for external tools (gh CLI, etc.)
114
+ β”œβ”€β”€ api.rs # Modular API endpoint definitions
115
+ β”œβ”€β”€ api_base.rs # Base API route configurations
116
+ └── api_client.rs # HTTP client abstraction layer (reqwest wrapper)
117
+ ```
118
+
119
+ ### Architecture Philosophy
120
+
121
+ - **`main.rs`**: Entry point with minimal code - simply bootstraps the CLI
122
+ - **`cli.rs`**: Expressive command definitions that clearly show what each command does
123
+ - **`cli_logic.rs`**: All business logic separated from CLI parsing for better testability
124
+ - **`services.rs`**: Service layer for external integrations (GitHub CLI, package managers)
125
+ - **`api.rs`**: Modular API layer for potential future web integrations
126
+ - **`api_base.rs`**: Base configurations and route definitions
127
+ - **`api_client.rs`**: HTTP client abstraction for easy swapping of underlying libraries
128
+
129
+ The `cli.rs` file maintains clean separation by calling services and API routes in an understandable, non-overwhelming manner.
130
+
131
+ ## Supported Tools
132
+
133
+ | Tool | Description | Status |
134
+ |------|-------------|--------|
135
+ | `claude-code` | Anthropic's Claude for code assistance | βœ… Supported |
136
+ | `gemini-cli` | Google's Gemini CLI tool | βœ… Supported |
137
+ | `qwen-code` | Qwen coding assistant | βœ… Supported |
138
+ | `opencode` | Open-source coding tool | βœ… Supported |
139
+
140
+ ## Adding New Tools
141
+
142
+ Terminal Jarvis is designed to make adding new CLI tools straightforward:
143
+
144
+ 1. Define the tool configuration in `cli_logic.rs`
145
+ 2. Add the command interface in `cli.rs`
146
+ 3. Implement any required services in `services.rs`
147
+ 4. Update the tool registry
148
+
149
+ Example structure for adding a new tool:
150
+
151
+ ```rust
152
+ // In cli_logic.rs
153
+ pub fn handle_new_tool(args: &NewToolArgs) -> Result<()> {
154
+ // Tool-specific logic here
155
+ }
156
+
157
+ // In cli.rs
158
+ #[derive(Parser)]
159
+ pub struct NewToolArgs {
160
+ // Tool arguments
161
+ }
162
+ ```
163
+
164
+ ## Requirements
165
+
166
+ - Rust 1.70 or later
167
+ - `gh` CLI (for template management features)
168
+ - Internet connection (for package updates)
169
+
170
+ ## Configuration
171
+
172
+ Terminal Jarvis looks for configuration in the following locations:
173
+
174
+ 1. `~/.config/terminal-jarvis/config.toml`
175
+ 2. `./terminal-jarvis.toml` (project-specific)
176
+
177
+ Example configuration:
178
+
179
+ ```toml
180
+ [tools]
181
+ claude-code = { enabled = true, auto_update = true }
182
+ gemini-cli = { enabled = true, auto_update = false }
183
+ qwen-code = { enabled = true, auto_update = true }
184
+ opencode = { enabled = false, auto_update = false }
185
+
186
+ [templates]
187
+ repository = "your-username/jarvis-templates"
188
+ auto_sync = true
189
+ ```
190
+
191
+ ## Contributing
192
+
193
+ 1. Fork the repository
194
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
195
+ 3. Make your changes following the project structure
196
+ 4. Ensure tests pass (`cargo test`)
197
+ 5. Commit your changes (`git commit -m 'Add amazing feature'`)
198
+ 6. Push to the branch (`git push origin feature/amazing-feature`)
199
+ 7. Open a Pull Request
200
+
201
+ ## License
202
+
203
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
204
+
205
+ ## NPM Distribution
206
+
207
+ Terminal Jarvis is also available as an NPM package for easy installation and usage:
208
+
209
+ ```bash
210
+ # Install globally via NPM
211
+ npm install -g terminal-jarvis
212
+
213
+ # Or run directly with npx
214
+ npx terminal-jarvis --help
215
+ ```
216
+
217
+ The NPM packaging approach follows the excellent guidance from [Packaging Rust Applications for the NPM Registry](https://blog.orhun.dev/packaging-rust-for-npm/) by Orhun ParmaksΔ±z. This allows us to distribute platform-specific binaries through NPM while maintaining the convenience of `npx` for quick execution.
218
+
219
+ ## Roadmap
220
+
221
+ - [ ] Enhanced error handling and logging
222
+ - [ ] Configuration file validation
223
+ - [ ] Plugin system for custom tools
224
+ - [ ] Shell completion scripts
225
+ - [ ] Docker container support
226
+ - [ ] Web dashboard for tool management
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
- console.log("Terminal Jarvis v0.0.2");
3
+ console.log("Terminal Jarvis v0.0.4");
4
4
  console.log("This is a preview release - full binary support coming soon!");
5
5
  console.log("");
6
6
  console.log("Available commands:");
package/package.json CHANGED
@@ -1,14 +1,25 @@
1
1
  {
2
2
  "name": "terminal-jarvis",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "A thin Rust wrapper that provides a unified interface for managing and running AI coding tools",
5
5
  "bin": "lib/index.js",
6
+ "files": [
7
+ "lib/",
8
+ "README.md",
9
+ "package.json"
10
+ ],
6
11
  "scripts": {
12
+ "sync-readme": "cp ../../README.md .",
7
13
  "typecheck": "tsc --noEmit",
8
- "lint": "eslint .",
9
- "lint:fix": "eslint . --fix",
10
- "build": "tsc",
11
- "dev": "yarn build && node lib/index.js"
14
+ "lint": "biome lint src/",
15
+ "lint:fix": "biome lint --write src/",
16
+ "format": "biome format src/",
17
+ "format:fix": "biome format --write src/",
18
+ "check": "biome check src/",
19
+ "check:fix": "biome check --write src/",
20
+ "build": "npm run sync-readme && tsc",
21
+ "prepublishOnly": "npm run build",
22
+ "dev": "npm run build && node lib/index.js"
12
23
  },
13
24
  "keywords": [
14
25
  "cli",
@@ -28,10 +39,8 @@
28
39
  },
29
40
  "homepage": "https://github.com/BA-CalderonMorales/terminal-jarvis#readme",
30
41
  "devDependencies": {
31
- "@types/node": "^18.11.18",
32
- "@typescript-eslint/eslint-plugin": "^5.48.0",
33
- "@typescript-eslint/parser": "^5.48.0",
34
- "eslint": "^8.31.0",
35
- "typescript": "^4.9.4"
42
+ "@biomejs/biome": "^2.1.3",
43
+ "@types/node": "^20.0.0",
44
+ "typescript": "^5.0.0"
36
45
  }
37
46
  }
package/.eslintrc.json DELETED
@@ -1,22 +0,0 @@
1
- {
2
- "root": true,
3
- "parser": "@typescript-eslint/parser",
4
- "parserOptions": {
5
- "ecmaVersion": 2020,
6
- "sourceType": "module"
7
- },
8
- "plugins": ["@typescript-eslint"],
9
- "extends": [
10
- "eslint:recommended",
11
- "@typescript-eslint/recommended"
12
- ],
13
- "rules": {
14
- "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
15
- "@typescript-eslint/explicit-function-return-type": "off",
16
- "@typescript-eslint/no-explicit-any": "warn"
17
- },
18
- "env": {
19
- "node": true,
20
- "es6": true
21
- }
22
- }
package/src/index.ts DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- console.log("Terminal Jarvis v0.0.2");
4
- console.log("This is a preview release - full binary support coming soon!");
5
- console.log("");
6
- console.log("Available commands:");
7
- console.log(" list - List available AI coding tools");
8
- console.log(" run - Run a specific tool");
9
- console.log(" update - Update packages");
10
- console.log(" templates - Manage templates");
11
- console.log("");
12
- console.log("Note: Please install the Rust binary version for full functionality:");
13
- console.log(" cargo install terminal-jarvis");
14
-
15
- process.exit(0);
package/tsconfig.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "commonjs",
5
- "lib": ["ES2020"],
6
- "outDir": "./lib",
7
- "rootDir": "./src",
8
- "strict": true,
9
- "esModuleInterop": true,
10
- "skipLibCheck": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "declaration": true,
13
- "declarationMap": true,
14
- "sourceMap": true
15
- },
16
- "include": ["src/**/*"],
17
- "exclude": ["node_modules", "lib"]
18
- }