deepagents-cli 0.0.12
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 +158 -0
- package/dist/cli.js +54 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +3 -0
- package/package.json +80 -0
package/README.md
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# deepagents-cli
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/deepagents-cli)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
**DeepAgents CLI** - An AI coding assistant that runs in your terminal, powered by [DeepAgents](https://github.com/langchain-ai/deepagents).
|
|
7
|
+
|
|
8
|
+
This package wraps the Python [deepagents-cli](https://pypi.org/project/deepagents-cli/) as platform-specific binaries, allowing you to use the full-featured CLI without installing Python.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Using npm
|
|
14
|
+
npm install -g deepagents-cli
|
|
15
|
+
|
|
16
|
+
# Using pnpm
|
|
17
|
+
pnpm add -g deepagents-cli
|
|
18
|
+
|
|
19
|
+
# Using yarn
|
|
20
|
+
yarn global add deepagents-cli
|
|
21
|
+
|
|
22
|
+
# Or run directly with npx (no installation required)
|
|
23
|
+
npx deepagents-cli
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Start the interactive CLI
|
|
30
|
+
deepagents
|
|
31
|
+
|
|
32
|
+
# Get help
|
|
33
|
+
deepagents help
|
|
34
|
+
|
|
35
|
+
# List available agents
|
|
36
|
+
deepagents list
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Features
|
|
40
|
+
|
|
41
|
+
- **Built-in Tools**: File operations (read, write, edit, glob, grep), shell commands, web search, and subagent delegation
|
|
42
|
+
- **Customizable Skills**: Add domain-specific capabilities through a progressive disclosure skill system
|
|
43
|
+
- **Persistent Memory**: Agent remembers your preferences, coding style, and project context across sessions
|
|
44
|
+
- **Project-Aware**: Automatically detects project roots and loads project-specific configurations
|
|
45
|
+
|
|
46
|
+
## Usage
|
|
47
|
+
|
|
48
|
+
### Basic Commands
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Start the CLI (default agent)
|
|
52
|
+
deepagents
|
|
53
|
+
|
|
54
|
+
# Use a specific agent configuration
|
|
55
|
+
deepagents --agent mybot
|
|
56
|
+
|
|
57
|
+
# Use a specific model (auto-detects provider)
|
|
58
|
+
deepagents --model claude-sonnet-4-5-20250929
|
|
59
|
+
deepagents --model gpt-4o
|
|
60
|
+
|
|
61
|
+
# Auto-approve tool usage (skip human-in-the-loop prompts)
|
|
62
|
+
deepagents --auto-approve
|
|
63
|
+
|
|
64
|
+
# Execute code in a remote sandbox
|
|
65
|
+
deepagents --sandbox modal # or runloop, daytona
|
|
66
|
+
deepagents --sandbox-id dbx_123 # reuse existing sandbox
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Skills Management
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# List all skills (global + project)
|
|
73
|
+
deepagents skills list
|
|
74
|
+
|
|
75
|
+
# Create a new skill
|
|
76
|
+
deepagents skills create my-skill
|
|
77
|
+
|
|
78
|
+
# View skill information
|
|
79
|
+
deepagents skills info web-research
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Environment Variables
|
|
83
|
+
|
|
84
|
+
Set your API keys:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Model providers (at least one required)
|
|
88
|
+
export ANTHROPIC_API_KEY="your-key"
|
|
89
|
+
export OPENAI_API_KEY="your-key"
|
|
90
|
+
export GOOGLE_API_KEY="your-key"
|
|
91
|
+
|
|
92
|
+
# Optional: Web search
|
|
93
|
+
export TAVILY_API_KEY="your-key"
|
|
94
|
+
|
|
95
|
+
# Optional: LangSmith tracing
|
|
96
|
+
export LANGCHAIN_TRACING_V2=true
|
|
97
|
+
export LANGCHAIN_API_KEY="your-key"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Supported Platforms
|
|
101
|
+
|
|
102
|
+
| Platform | Architecture | Package |
|
|
103
|
+
| -------- | --------------------- | ------------------------------ |
|
|
104
|
+
| Linux | x64 | `@deepagents-cli/linux-x64` |
|
|
105
|
+
| Linux | ARM64 | `@deepagents-cli/linux-arm64` |
|
|
106
|
+
| macOS | Intel (x64) | `@deepagents-cli/darwin-x64` |
|
|
107
|
+
| macOS | Apple Silicon (ARM64) | `@deepagents-cli/darwin-arm64` |
|
|
108
|
+
| Windows | x64 | `@deepagents-cli/win32-x64` |
|
|
109
|
+
|
|
110
|
+
The appropriate platform package is automatically installed based on your system.
|
|
111
|
+
|
|
112
|
+
## Troubleshooting
|
|
113
|
+
|
|
114
|
+
### Binary not found
|
|
115
|
+
|
|
116
|
+
If you see an error about the binary not being found:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Reinstall the package
|
|
120
|
+
npm uninstall -g deepagents-cli
|
|
121
|
+
npm install -g deepagents-cli
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Unsupported platform
|
|
125
|
+
|
|
126
|
+
If your platform is not supported, please [open an issue](https://github.com/langchain-ai/deepagentsjs/issues).
|
|
127
|
+
|
|
128
|
+
## Version Synchronization
|
|
129
|
+
|
|
130
|
+
This package automatically mirrors the version of the Python [deepagents-cli](https://pypi.org/project/deepagents-cli/). New versions are typically available within 24 hours of a PyPI release.
|
|
131
|
+
|
|
132
|
+
## Programmatic API
|
|
133
|
+
|
|
134
|
+
You can also use this package programmatically:
|
|
135
|
+
|
|
136
|
+
```typescript
|
|
137
|
+
import { getBinaryPath, isAvailable, getVersion } from "deepagents-cli";
|
|
138
|
+
|
|
139
|
+
// Check if CLI is available for this platform
|
|
140
|
+
if (isAvailable()) {
|
|
141
|
+
const binaryPath = getBinaryPath();
|
|
142
|
+
console.log(`CLI binary at: ${binaryPath}`);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Get installed version
|
|
146
|
+
const version = getVersion();
|
|
147
|
+
console.log(`Version: ${version}`);
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
|
|
152
|
+
MIT - see [LICENSE](https://github.com/langchain-ai/deepagentsjs/blob/main/LICENSE)
|
|
153
|
+
|
|
154
|
+
## Related
|
|
155
|
+
|
|
156
|
+
- [deepagents](https://www.npmjs.com/package/deepagents) - The core DeepAgents library for building AI agents
|
|
157
|
+
- [deepagents-cli (PyPI)](https://pypi.org/project/deepagents-cli/) - The Python version of this CLI
|
|
158
|
+
- [LangGraph](https://github.com/langchain-ai/langgraph) - Framework for building stateful agents
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { a as getUnsupportedPlatformMessage, r as getPlatformKey, t as getBinaryPath } from "./src-CVD1UvZG.js";
|
|
3
|
+
import { spawn } from "node:child_process";
|
|
4
|
+
|
|
5
|
+
//#region src/cli.ts
|
|
6
|
+
/**
|
|
7
|
+
* Main entry point
|
|
8
|
+
*/
|
|
9
|
+
async function main() {
|
|
10
|
+
const binaryPath = getBinaryPath();
|
|
11
|
+
if (!binaryPath) {
|
|
12
|
+
console.error(`Error: Could not find deepagents binary for your platform.`);
|
|
13
|
+
console.error(`Platform: ${getPlatformKey()}`);
|
|
14
|
+
console.error("");
|
|
15
|
+
console.error(getUnsupportedPlatformMessage());
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
19
|
+
stdio: "inherit",
|
|
20
|
+
env: process.env,
|
|
21
|
+
shell: process.platform === "win32"
|
|
22
|
+
});
|
|
23
|
+
child.on("error", (error) => {
|
|
24
|
+
if (error.code === "ENOENT") {
|
|
25
|
+
console.error(`Error: Binary not found at ${binaryPath}`);
|
|
26
|
+
console.error("The CLI binary may have been removed or corrupted.");
|
|
27
|
+
console.error("Try reinstalling: npm install -g deepagents-cli");
|
|
28
|
+
} else if (error.code === "EACCES") {
|
|
29
|
+
console.error(`Error: Permission denied executing ${binaryPath}`);
|
|
30
|
+
console.error("Try: chmod +x " + binaryPath);
|
|
31
|
+
} else console.error(`Error starting deepagents: ${error.message}`);
|
|
32
|
+
process.exit(1);
|
|
33
|
+
});
|
|
34
|
+
child.on("close", (code, signal) => {
|
|
35
|
+
if (signal) process.exit(128 + (signal === "SIGINT" ? 2 : signal === "SIGTERM" ? 15 : 1));
|
|
36
|
+
process.exit(code ?? 0);
|
|
37
|
+
});
|
|
38
|
+
const forwardSignal = (signal) => {
|
|
39
|
+
if (!child.killed) child.kill(signal);
|
|
40
|
+
};
|
|
41
|
+
process.on("SIGINT", () => forwardSignal("SIGINT"));
|
|
42
|
+
process.on("SIGTERM", () => forwardSignal("SIGTERM"));
|
|
43
|
+
process.on("disconnect", () => {
|
|
44
|
+
if (!child.killed) child.kill("SIGTERM");
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
main().catch((error) => {
|
|
48
|
+
console.error("Unexpected error:", error.message);
|
|
49
|
+
process.exit(1);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { };
|
|
54
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* DeepAgents CLI - Programmatic API
|
|
4
|
+
*
|
|
5
|
+
* This module provides utilities for locating and invoking the DeepAgents CLI binary.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Platform-specific package information
|
|
9
|
+
*/
|
|
10
|
+
interface PlatformInfo {
|
|
11
|
+
/** NPM package name for this platform */
|
|
12
|
+
packageName: string;
|
|
13
|
+
/** Binary filename (deepagents or deepagents.exe) */
|
|
14
|
+
binaryName: string;
|
|
15
|
+
/** Operating system */
|
|
16
|
+
os: "linux" | "darwin" | "win32";
|
|
17
|
+
/** CPU architecture */
|
|
18
|
+
cpu: "x64" | "arm64";
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get the current platform key (e.g., "darwin-arm64")
|
|
22
|
+
*/
|
|
23
|
+
declare function getPlatformKey(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Get the platform-specific package info for the current system
|
|
26
|
+
* @returns Platform info or null if the platform is not supported
|
|
27
|
+
*/
|
|
28
|
+
declare function getPlatformInfo(): PlatformInfo | null;
|
|
29
|
+
/**
|
|
30
|
+
* Get all supported platforms
|
|
31
|
+
*/
|
|
32
|
+
declare function getSupportedPlatforms(): string[];
|
|
33
|
+
/**
|
|
34
|
+
* Get the path to the deepagents binary for the current platform
|
|
35
|
+
* @returns Absolute path to the binary, or null if not found/unsupported
|
|
36
|
+
*/
|
|
37
|
+
declare function getBinaryPath(): string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Check if the CLI is available for the current platform
|
|
40
|
+
* @returns true if the binary exists and is accessible
|
|
41
|
+
*/
|
|
42
|
+
declare function isAvailable(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Get the version of the installed CLI package
|
|
45
|
+
* @returns Version string or null if unable to determine
|
|
46
|
+
*/
|
|
47
|
+
declare function getVersion(): string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Get detailed error message for unsupported/missing platforms
|
|
50
|
+
*/
|
|
51
|
+
declare function getUnsupportedPlatformMessage(): string;
|
|
52
|
+
//#endregion
|
|
53
|
+
export { PlatformInfo, getBinaryPath, getPlatformInfo, getPlatformKey, getSupportedPlatforms, getUnsupportedPlatformMessage, getVersion, isAvailable };
|
|
54
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as getUnsupportedPlatformMessage, i as getSupportedPlatforms, n as getPlatformInfo, o as getVersion, r as getPlatformKey, s as isAvailable, t as getBinaryPath } from "./src-CVD1UvZG.js";
|
|
2
|
+
|
|
3
|
+
export { getBinaryPath, getPlatformInfo, getPlatformKey, getSupportedPlatforms, getUnsupportedPlatformMessage, getVersion, isAvailable };
|
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "deepagents-cli",
|
|
3
|
+
"version": "0.0.12",
|
|
4
|
+
"description": "DeepAgents CLI - AI Coding Assistant for your terminal",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"bin": {
|
|
10
|
+
"deepagents": "./dist/cli.js"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"./package.json": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist/index.js",
|
|
23
|
+
"dist/index.d.ts",
|
|
24
|
+
"dist/cli.js",
|
|
25
|
+
"README.md"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsdown",
|
|
29
|
+
"clean": "rm -rf dist/ .tsdown/",
|
|
30
|
+
"dev": "tsdown --watch",
|
|
31
|
+
"typecheck": "tsc --noEmit",
|
|
32
|
+
"prepublishOnly": "pnpm build",
|
|
33
|
+
"build:cli": "tsx scripts/build.ts",
|
|
34
|
+
"build:cli:linux-x64": "tsx scripts/build.ts --platform linux-x64",
|
|
35
|
+
"build:cli:linux-arm64": "tsx scripts/build.ts --platform linux-arm64",
|
|
36
|
+
"build:cli:darwin-x64": "tsx scripts/build.ts --platform darwin-x64",
|
|
37
|
+
"build:cli:darwin-arm64": "tsx scripts/build.ts --platform darwin-arm64",
|
|
38
|
+
"build:cli:win32-x64": "tsx scripts/build.ts --platform win32-x64",
|
|
39
|
+
"test": "vitest run",
|
|
40
|
+
"test:watch": "vitest"
|
|
41
|
+
},
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "git+https://github.com/langchain-ai/deepagentsjs.git",
|
|
45
|
+
"directory": "libs/cli"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"deepagents",
|
|
49
|
+
"cli",
|
|
50
|
+
"ai",
|
|
51
|
+
"coding-assistant",
|
|
52
|
+
"langchain",
|
|
53
|
+
"langgraph",
|
|
54
|
+
"terminal"
|
|
55
|
+
],
|
|
56
|
+
"author": "LangChain",
|
|
57
|
+
"bugs": {
|
|
58
|
+
"url": "https://github.com/langchain-ai/deepagentsjs/issues"
|
|
59
|
+
},
|
|
60
|
+
"homepage": "https://github.com/langchain-ai/deepagentsjs/tree/main/libs/cli#readme",
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=18"
|
|
63
|
+
},
|
|
64
|
+
"optionalDependencies": {
|
|
65
|
+
"@deepagents-cli/linux-x64": "0.0.12",
|
|
66
|
+
"@deepagents-cli/linux-arm64": "0.0.12",
|
|
67
|
+
"@deepagents-cli/darwin-x64": "0.0.12",
|
|
68
|
+
"@deepagents-cli/darwin-arm64": "0.0.12",
|
|
69
|
+
"@deepagents-cli/win32-x64": "0.0.12"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@types/fs-extra": "^11.0.4",
|
|
73
|
+
"@types/node": "^22.0.0",
|
|
74
|
+
"fs-extra": "^11.3.0",
|
|
75
|
+
"tsdown": "^0.15.12",
|
|
76
|
+
"tsx": "^4.20.5",
|
|
77
|
+
"typescript": "^5.9.2",
|
|
78
|
+
"vitest": "^4.0.16"
|
|
79
|
+
}
|
|
80
|
+
}
|