@phanthy/phanthy-code 0.1.0 → 0.1.2

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.
Files changed (3) hide show
  1. package/README.md +48 -43
  2. package/dist/cli.js +1625 -1622
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -8,7 +8,6 @@ phanthy code is a software engineering CLI owned and maintained by **phanthy gro
8
8
 
9
9
  - Copyright and ownership belong to phanthy group.
10
10
  - phanthy code is maintained as an independent phanthy group project.
11
- - The default API endpoint is `http://oneapi.4pd.io:3000`; set `PHANTHY_BASE_URL` to override it.
12
11
 
13
12
  ---
14
13
 
@@ -23,52 +22,58 @@ phanthy code is a CLI for performing software engineering tasks such as editing
23
22
 
24
23
  ---
25
24
 
26
- ## Directory Structure
27
-
28
- ```text
29
- src/
30
- ├── main.tsx # Entrypoint orchestration (Commander.js-based CLI path)
31
- ├── commands.ts # Command registry
32
- ├── tools.ts # Tool registry
33
- ├── Tool.ts # Tool type definitions
34
- ├── QueryEngine.ts # LLM query engine
35
- ├── context.ts # System/user context collection
36
- ├── cost-tracker.ts # Token cost tracking
37
-
38
- ├── commands/ # Slash command implementations (~50)
39
- ├── tools/ # Agent tool implementations (~40)
40
- ├── components/ # Ink UI components (~140)
41
- ├── hooks/ # React hooks
42
- ├── services/ # External service integrations
43
- ├── screens/ # Full-screen UIs (Doctor, REPL, Resume)
44
- ├── types/ # TypeScript type definitions
45
- ├── utils/ # Utility functions
46
-
47
- ├── bridge/ # IDE and remote-control bridge
48
- ├── coordinator/ # Multi-agent coordinator
49
- ├── plugins/ # Plugin system
50
- ├── skills/ # Skill system
51
- ├── keybindings/ # Keybinding configuration
52
- ├── vim/ # Vim mode
53
- ├── voice/ # Voice input
54
- ├── remote/ # Remote sessions
55
- ├── server/ # Server mode
56
- ├── memdir/ # Persistent memory directory
57
- ├── tasks/ # Task management
58
- ├── state/ # State management
59
- ├── migrations/ # Config migrations
60
- ├── schemas/ # Config schemas (Zod)
61
- ├── entrypoints/ # Initialization logic
62
- ├── ink/ # Ink renderer wrapper
63
- ├── native-ts/ # Native TypeScript utilities
64
- ├── outputStyles/ # Output styling
65
- ├── query/ # Query pipeline
66
- └── upstreamproxy/ # Proxy configuration
25
+ ## Installation
26
+
27
+ Install Bun before using the CLI or working on the repository:
28
+
29
+ ```sh
30
+ curl -fsSL https://bun.sh/install | bash
31
+ ```
32
+
33
+ Install the published CLI with npm:
34
+
35
+ ```sh
36
+ npm install -g @phanthy/phanthy-code
37
+ ```
38
+
39
+ For local development, install repository dependencies with Bun:
40
+
41
+ ```sh
42
+ bun install
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Environment Variables
48
+
49
+ Set authentication and service configuration through environment variables:
50
+
51
+ ```sh
52
+ export PHANTHY_API_KEY="your-api-key"
53
+ ```
54
+
55
+ `PHANTHY_API_KEY` is the developer-token path. When it is set, the CLI skips web
56
+ login and calls `https://router.phanthy.com` by default.
57
+
58
+ Without `PHANTHY_API_KEY`, the CLI signs in through `https://coding-plan.phanthy.com`
59
+ and sends model API requests to Code with the stored OAuth access token.
60
+
61
+ Useful endpoint overrides:
62
+
63
+ ```sh
64
+ export PHANTHY_CODE_BASE_URL="http://localhost:3001"
65
+ export PHANTHY_ROUTER_BASE_URL="https://router.phanthy.com"
66
+ export PHANTHY_BASE_URL="https://your-phanthy-api.example.com"
67
67
  ```
68
68
 
69
+ `PHANTHY_CODE_BASE_URL` points OAuth and normal logged-in API traffic at a local
70
+ or alternate Code deployment. `PHANTHY_ROUTER_BASE_URL` overrides the API-key
71
+ router endpoint. `PHANTHY_BASE_URL` is the strongest override and forces all
72
+ first-party API traffic to a custom endpoint.
73
+
69
74
  ---
70
75
 
71
76
  ## Research / Ownership Disclaimer
72
77
 
73
78
  - This repository is owned and maintained by **phanthy group**.
74
- - phanthy code uses the phanthy API configuration by default.
79
+ - phanthy code uses phanthy API configuration.