@shepai/cli 1.0.1
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/LICENSE +21 -0
- package/README.md +200 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/infrastructure/services/version.service.d.ts +27 -0
- package/dist/infrastructure/services/version.service.d.ts.map +1 -0
- package/dist/infrastructure/services/version.service.js +80 -0
- package/dist/presentation/cli/commands/version.command.d.ts +22 -0
- package/dist/presentation/cli/commands/version.command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/version.command.js +35 -0
- package/dist/presentation/cli/index.d.ts +20 -0
- package/dist/presentation/cli/index.d.ts.map +1 -0
- package/dist/presentation/cli/index.js +48 -0
- package/dist/presentation/cli/ui/colors.d.ts +33 -0
- package/dist/presentation/cli/ui/colors.d.ts.map +1 -0
- package/dist/presentation/cli/ui/colors.js +35 -0
- package/dist/presentation/cli/ui/formatters.d.ts +37 -0
- package/dist/presentation/cli/ui/formatters.d.ts.map +1 -0
- package/dist/presentation/cli/ui/formatters.js +38 -0
- package/dist/presentation/cli/ui/index.d.ts +18 -0
- package/dist/presentation/cli/ui/index.d.ts.map +1 -0
- package/dist/presentation/cli/ui/index.js +17 -0
- package/dist/presentation/cli/ui/messages.d.ts +57 -0
- package/dist/presentation/cli/ui/messages.d.ts.map +1 -0
- package/dist/presentation/cli/ui/messages.js +76 -0
- package/dist/presentation/cli/ui/symbols.d.ts +37 -0
- package/dist/presentation/cli/ui/symbols.d.ts.map +1 -0
- package/dist/presentation/cli/ui/symbols.js +65 -0
- package/package.json +107 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Shep AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# 🐑 Shep AI
|
|
4
|
+
|
|
5
|
+
### Autonomous AI Native SDLC Platform
|
|
6
|
+
|
|
7
|
+
_Automate the entire development cycle from idea to deploy_
|
|
8
|
+
|
|
9
|
+
[](https://github.com/shep-ai/cli/actions/workflows/ci.yml)
|
|
10
|
+
[](https://www.npmjs.com/package/@shepai/cli)
|
|
11
|
+
[](https://opensource.org/licenses/MIT)
|
|
12
|
+
[](https://www.typescriptlang.org/)
|
|
13
|
+
[](https://nodejs.org/)
|
|
14
|
+
[](https://pnpm.io/)
|
|
15
|
+
[](https://github.com/shep-ai/cli/pulls)
|
|
16
|
+
[](https://conventionalcommits.org)
|
|
17
|
+
|
|
18
|
+
<br />
|
|
19
|
+
|
|
20
|
+
[Getting Started](#quick-start) •
|
|
21
|
+
[Documentation](#documentation) •
|
|
22
|
+
[Contributing](#contributing) •
|
|
23
|
+
[License](#license)
|
|
24
|
+
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
Shep is an intelligent CLI tool that transforms how you build software. Point it at any repository, and it will analyze your codebase, gather requirements through conversational AI, break down features into actionable tasks, generate comprehensive documentation, and execute implementation autonomously.
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pnpm add -g @shepai/cli
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Or with npm:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g @shepai/cli
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cd ~/repos/your-project
|
|
47
|
+
shep
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Or explicitly initialize:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
shep --init
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
This launches a TUI wizard to:
|
|
57
|
+
|
|
58
|
+
1. Configure Claude Code authentication (setup token or use existing session)
|
|
59
|
+
2. Start repository analysis
|
|
60
|
+
3. Open the web UI at `http://localhost:3030/`
|
|
61
|
+
|
|
62
|
+
## How It Works
|
|
63
|
+
|
|
64
|
+
### Repository Analysis
|
|
65
|
+
|
|
66
|
+
When you run `shep`, it performs comprehensive multi-perspective analysis of your codebase:
|
|
67
|
+
|
|
68
|
+
- Architecture patterns and structure
|
|
69
|
+
- Technology stack detection
|
|
70
|
+
- Code conventions and style
|
|
71
|
+
- Dependency mapping
|
|
72
|
+
- Testing patterns
|
|
73
|
+
- Documentation coverage
|
|
74
|
+
|
|
75
|
+
Analysis results are persisted in `~/.shep/repos/<encoded-repo-path>/docs/` for instant access on subsequent runs.
|
|
76
|
+
|
|
77
|
+
### Feature Lifecycle
|
|
78
|
+
|
|
79
|
+
Every feature follows the SDLC lifecycle:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
Requirements → Plan → Implementation → Test → Deploy → Maintenance
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
#### 1. Requirements Phase
|
|
86
|
+
|
|
87
|
+
Interactive chat-based gathering powered by repository context. The AI proposes relevant options based on your codebase analysis, ensuring no open questions remain.
|
|
88
|
+
|
|
89
|
+
#### 2. Plan Phase
|
|
90
|
+
|
|
91
|
+
Automatic breakdown into:
|
|
92
|
+
|
|
93
|
+
- **Tasks** - High-level work items with dependencies
|
|
94
|
+
- **Action Items** - Granular steps within tasks
|
|
95
|
+
- **Artifacts** - Generated documentation (PRDs, RFCs, Design Docs, Tech Plans)
|
|
96
|
+
|
|
97
|
+
#### 3. Implementation Phase
|
|
98
|
+
|
|
99
|
+
Autonomous code generation using LangGraph agents, executing tasks according to the dependency graph.
|
|
100
|
+
|
|
101
|
+
#### 4. Test → Deploy → Maintenance
|
|
102
|
+
|
|
103
|
+
Continuous lifecycle management with AI assistance at every stage.
|
|
104
|
+
|
|
105
|
+
## Spec-Driven Development
|
|
106
|
+
|
|
107
|
+
All contributions follow our spec-driven workflow:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
/shep-kit:new-feature → /shep-kit:research → /shep-kit:plan → implement
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Every feature begins with a specification in `specs/NNN-feature-name/` before any implementation code is written. See [Spec-Driven Workflow](./docs/development/spec-driven-workflow.md) for details.
|
|
114
|
+
|
|
115
|
+
## Architecture
|
|
116
|
+
|
|
117
|
+
Shep follows **Clean Architecture** principles:
|
|
118
|
+
|
|
119
|
+
```mermaid
|
|
120
|
+
flowchart TB
|
|
121
|
+
P["<b>Presentation</b><br/>CLI · Web UI · TUI"]
|
|
122
|
+
A["<b>Application</b><br/>Use Cases · Orchestration · Ports"]
|
|
123
|
+
D["<b>Domain</b><br/>Entities · Value Objects · Services"]
|
|
124
|
+
I["<b>Infrastructure</b><br/>SQLite · LangGraph · LanceDB"]
|
|
125
|
+
|
|
126
|
+
P --> A --> D
|
|
127
|
+
I --> A
|
|
128
|
+
|
|
129
|
+
style P fill:#dbeafe,stroke:#3b82f6,color:#1e3a5f
|
|
130
|
+
style A fill:#fef3c7,stroke:#f59e0b,color:#78350f
|
|
131
|
+
style D fill:#d1fae5,stroke:#10b981,color:#064e3b
|
|
132
|
+
style I fill:#ede9fe,stroke:#8b5cf6,color:#4c1d95
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Data Persistence
|
|
136
|
+
|
|
137
|
+
Uses **Repository Pattern** with SQLite:
|
|
138
|
+
|
|
139
|
+
- Database location: `~/.shep/repos/<encoded-repo-path>/data`
|
|
140
|
+
- Interface-driven design for testability
|
|
141
|
+
- Supports future backend swaps
|
|
142
|
+
|
|
143
|
+
## Tech Stack
|
|
144
|
+
|
|
145
|
+
| Component | Technology |
|
|
146
|
+
| --------------- | --------------------------------------------------------------------------------------- |
|
|
147
|
+
| Language | TypeScript |
|
|
148
|
+
| Package Manager | pnpm |
|
|
149
|
+
| CLI Framework | Commander |
|
|
150
|
+
| TUI Framework | [OpenTUI](https://opentui.com/) |
|
|
151
|
+
| Web UI | Next.js + shadcn/ui |
|
|
152
|
+
| Design System | Storybook |
|
|
153
|
+
| Build Tool | Vite |
|
|
154
|
+
| Database | SQLite |
|
|
155
|
+
| Agent System | [LangGraph](https://www.langchain.com/langgraph) (`@langchain/langgraph`) |
|
|
156
|
+
| Vector DB | [LanceDB](https://lancedb.com/) (file-based) |
|
|
157
|
+
| Embeddings | [Transformers.js](https://huggingface.co/docs/transformers.js) (local, multiple models) |
|
|
158
|
+
| Testing | Vitest (unit/integration) + Playwright (e2e) |
|
|
159
|
+
| Methodology | TDD (Red-Green-Refactor) |
|
|
160
|
+
|
|
161
|
+
## Documentation
|
|
162
|
+
|
|
163
|
+
| Document | Description |
|
|
164
|
+
| -------------------------------------------------- | ---------------------------------- |
|
|
165
|
+
| [CLAUDE.md](./CLAUDE.md) | Guidance for Claude Code instances |
|
|
166
|
+
| [AGENTS.md](./AGENTS.md) | Agent system architecture |
|
|
167
|
+
| [CONTRIBUTING-AGENTS.md](./CONTRIBUTING-AGENTS.md) | AI agent contribution guidelines |
|
|
168
|
+
| [Architecture](./docs/architecture/) | System design and patterns |
|
|
169
|
+
| [Concepts](./docs/concepts/) | Core domain concepts |
|
|
170
|
+
| [Guides](./docs/guides/) | User guides and tutorials |
|
|
171
|
+
| [Development](./docs/development/) | Contributing and development setup |
|
|
172
|
+
| [API Reference](./docs/api/) | Interface and model documentation |
|
|
173
|
+
|
|
174
|
+
## Contributing
|
|
175
|
+
|
|
176
|
+
We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for human contributors and [CONTRIBUTING-AGENTS.md](./CONTRIBUTING-AGENTS.md) for AI agents.
|
|
177
|
+
|
|
178
|
+
## License
|
|
179
|
+
|
|
180
|
+
MIT License - see [LICENSE](./LICENSE) for details.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Maintaining This Document
|
|
185
|
+
|
|
186
|
+
**When to update:**
|
|
187
|
+
|
|
188
|
+
- New major features or commands
|
|
189
|
+
- Architecture changes
|
|
190
|
+
- Tech stack updates
|
|
191
|
+
- New documentation sections
|
|
192
|
+
|
|
193
|
+
**Style guide:**
|
|
194
|
+
|
|
195
|
+
- Keep Quick Start minimal (3-5 steps max)
|
|
196
|
+
- Update badges when versions change
|
|
197
|
+
- Ensure all internal links work
|
|
198
|
+
- Test code examples
|
|
199
|
+
|
|
200
|
+
**Related docs:** [CONTRIBUTING.md](./CONTRIBUTING.md), [docs/guides/getting-started.md](./docs/guides/getting-started.md)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Service
|
|
3
|
+
*
|
|
4
|
+
* Infrastructure service that reads version information from package.json.
|
|
5
|
+
* Follows Clean Architecture: Infrastructure layer implements data access.
|
|
6
|
+
*/
|
|
7
|
+
export interface VersionInfo {
|
|
8
|
+
/** Package version (e.g., "0.1.0") */
|
|
9
|
+
version: string;
|
|
10
|
+
/** Package name (e.g., "@shepai/cli") */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Package description */
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Service for reading version information from package.json
|
|
17
|
+
*/
|
|
18
|
+
export declare class VersionService {
|
|
19
|
+
private readonly versionInfo;
|
|
20
|
+
constructor();
|
|
21
|
+
private loadVersionInfo;
|
|
22
|
+
/**
|
|
23
|
+
* Get version information
|
|
24
|
+
*/
|
|
25
|
+
getVersion(): VersionInfo;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=version.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.service.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/services/version.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,WAAW,WAAW;IAC1B,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB;AA8BD;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;;IAM1C,OAAO,CAAC,eAAe;IAqCvB;;OAEG;IACH,UAAU,IAAI,WAAW;CAG1B"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Service
|
|
3
|
+
*
|
|
4
|
+
* Infrastructure service that reads version information from package.json.
|
|
5
|
+
* Follows Clean Architecture: Infrastructure layer implements data access.
|
|
6
|
+
*/
|
|
7
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
8
|
+
import { dirname, join } from 'node:path';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
/** Default version info when package.json cannot be read */
|
|
11
|
+
const DEFAULT_VERSION_INFO = {
|
|
12
|
+
version: 'unknown',
|
|
13
|
+
name: '@shepai/cli',
|
|
14
|
+
description: 'Autonomous AI Native SDLC Platform',
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Find package.json by traversing up from a starting directory.
|
|
18
|
+
* Works in both development (src/) and production (dist/) environments.
|
|
19
|
+
*/
|
|
20
|
+
function findPackageJson(startDir) {
|
|
21
|
+
let currentDir = startDir;
|
|
22
|
+
// Traverse up to find package.json (max 5 levels to avoid infinite loops)
|
|
23
|
+
for (let i = 0; i < 5; i++) {
|
|
24
|
+
const pkgPath = join(currentDir, 'package.json');
|
|
25
|
+
if (existsSync(pkgPath)) {
|
|
26
|
+
return pkgPath;
|
|
27
|
+
}
|
|
28
|
+
const parentDir = dirname(currentDir);
|
|
29
|
+
if (parentDir === currentDir)
|
|
30
|
+
break; // Reached filesystem root
|
|
31
|
+
currentDir = parentDir;
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Service for reading version information from package.json
|
|
37
|
+
*/
|
|
38
|
+
export class VersionService {
|
|
39
|
+
versionInfo;
|
|
40
|
+
constructor() {
|
|
41
|
+
this.versionInfo = this.loadVersionInfo();
|
|
42
|
+
}
|
|
43
|
+
loadVersionInfo() {
|
|
44
|
+
try {
|
|
45
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
46
|
+
const packageJsonPath = findPackageJson(__dirname);
|
|
47
|
+
if (!packageJsonPath) {
|
|
48
|
+
return DEFAULT_VERSION_INFO;
|
|
49
|
+
}
|
|
50
|
+
const content = readFileSync(packageJsonPath, 'utf-8');
|
|
51
|
+
const parsed = JSON.parse(content);
|
|
52
|
+
// Validate parsed JSON has required fields
|
|
53
|
+
if (typeof parsed === 'object' &&
|
|
54
|
+
parsed !== null &&
|
|
55
|
+
'version' in parsed &&
|
|
56
|
+
'name' in parsed &&
|
|
57
|
+
'description' in parsed &&
|
|
58
|
+
typeof parsed.version === 'string' &&
|
|
59
|
+
typeof parsed.name === 'string' &&
|
|
60
|
+
typeof parsed.description === 'string') {
|
|
61
|
+
return {
|
|
62
|
+
version: parsed.version,
|
|
63
|
+
name: parsed.name,
|
|
64
|
+
description: parsed.description,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return DEFAULT_VERSION_INFO;
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
// If anything goes wrong, return defaults to keep CLI functional
|
|
71
|
+
return DEFAULT_VERSION_INFO;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get version information
|
|
76
|
+
*/
|
|
77
|
+
getVersion() {
|
|
78
|
+
return this.versionInfo;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Command
|
|
3
|
+
*
|
|
4
|
+
* Displays detailed version information for Shep AI CLI.
|
|
5
|
+
* Provides more context than the --version flag.
|
|
6
|
+
*
|
|
7
|
+
* Usage: shep version
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* $ shep version
|
|
11
|
+
* @shepai/cli v0.1.0
|
|
12
|
+
* Autonomous AI Native SDLC Platform
|
|
13
|
+
*
|
|
14
|
+
* Node: v20.10.0
|
|
15
|
+
* Platform: linux x64
|
|
16
|
+
*/
|
|
17
|
+
import { Command } from 'commander';
|
|
18
|
+
/**
|
|
19
|
+
* Create the version command
|
|
20
|
+
*/
|
|
21
|
+
export declare function createVersionCommand(): Command;
|
|
22
|
+
//# sourceMappingURL=version.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/version.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAa9C"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Command
|
|
3
|
+
*
|
|
4
|
+
* Displays detailed version information for Shep AI CLI.
|
|
5
|
+
* Provides more context than the --version flag.
|
|
6
|
+
*
|
|
7
|
+
* Usage: shep version
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* $ shep version
|
|
11
|
+
* @shepai/cli v0.1.0
|
|
12
|
+
* Autonomous AI Native SDLC Platform
|
|
13
|
+
*
|
|
14
|
+
* Node: v20.10.0
|
|
15
|
+
* Platform: linux x64
|
|
16
|
+
*/
|
|
17
|
+
import { Command } from 'commander';
|
|
18
|
+
import { VersionService } from '../../../infrastructure/services/version.service.js';
|
|
19
|
+
import { colors, fmt, messages } from '../ui/index.js';
|
|
20
|
+
/**
|
|
21
|
+
* Create the version command
|
|
22
|
+
*/
|
|
23
|
+
export function createVersionCommand() {
|
|
24
|
+
return new Command('version').description('Display version information').action(() => {
|
|
25
|
+
const versionService = new VersionService();
|
|
26
|
+
const info = versionService.getVersion();
|
|
27
|
+
messages.newline();
|
|
28
|
+
console.log(`${fmt.heading(info.name)} ${fmt.version(info.version)}`);
|
|
29
|
+
console.log(colors.muted(info.description));
|
|
30
|
+
messages.newline();
|
|
31
|
+
console.log(`${fmt.label('Node:')} ${process.version}`);
|
|
32
|
+
console.log(`${fmt.label('Platform:')} ${process.platform} ${process.arch}`);
|
|
33
|
+
messages.newline();
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Shep AI CLI Entry Point
|
|
4
|
+
*
|
|
5
|
+
* Autonomous AI Native SDLC Platform - CLI Interface
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* shep [command] [options]
|
|
9
|
+
*
|
|
10
|
+
* Commands:
|
|
11
|
+
* shep Show help
|
|
12
|
+
* shep version Display version information
|
|
13
|
+
* shep --version Display version number only
|
|
14
|
+
*
|
|
15
|
+
* Global Options:
|
|
16
|
+
* -v, --version Display version number
|
|
17
|
+
* -h, --help Display help
|
|
18
|
+
*/
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/cli/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;GAgBG"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Shep AI CLI Entry Point
|
|
4
|
+
*
|
|
5
|
+
* Autonomous AI Native SDLC Platform - CLI Interface
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* shep [command] [options]
|
|
9
|
+
*
|
|
10
|
+
* Commands:
|
|
11
|
+
* shep Show help
|
|
12
|
+
* shep version Display version information
|
|
13
|
+
* shep --version Display version number only
|
|
14
|
+
*
|
|
15
|
+
* Global Options:
|
|
16
|
+
* -v, --version Display version number
|
|
17
|
+
* -h, --help Display help
|
|
18
|
+
*/
|
|
19
|
+
import { Command } from 'commander';
|
|
20
|
+
import { VersionService } from '../../infrastructure/services/version.service.js';
|
|
21
|
+
import { createVersionCommand } from './commands/version.command.js';
|
|
22
|
+
import { messages } from './ui/index.js';
|
|
23
|
+
// Initialize version service
|
|
24
|
+
const versionService = new VersionService();
|
|
25
|
+
const { version, description } = versionService.getVersion();
|
|
26
|
+
// Create main program
|
|
27
|
+
const program = new Command()
|
|
28
|
+
.name('shep')
|
|
29
|
+
.description(description)
|
|
30
|
+
.version(version, '-v, --version', 'Display version number')
|
|
31
|
+
.action(() => {
|
|
32
|
+
// Default action when no subcommand is provided - show help
|
|
33
|
+
program.outputHelp();
|
|
34
|
+
});
|
|
35
|
+
// Register commands
|
|
36
|
+
program.addCommand(createVersionCommand());
|
|
37
|
+
// Global error handler
|
|
38
|
+
process.on('uncaughtException', (error) => {
|
|
39
|
+
messages.error('An unexpected error occurred', error);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
});
|
|
42
|
+
process.on('unhandledRejection', (reason) => {
|
|
43
|
+
const error = reason instanceof Error ? reason : new Error(String(reason));
|
|
44
|
+
messages.error('Unhandled promise rejection', error);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
});
|
|
47
|
+
// Parse arguments
|
|
48
|
+
program.parse();
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System - Colors
|
|
3
|
+
*
|
|
4
|
+
* Centralized color palette for consistent terminal output.
|
|
5
|
+
* Uses picocolors for fast, lightweight ANSI color support.
|
|
6
|
+
*
|
|
7
|
+
* Respects NO_COLOR environment variable automatically.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* import { colors } from './colors';
|
|
11
|
+
* console.log(colors.success('Operation completed'));
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Semantic color palette for CLI output
|
|
15
|
+
*/
|
|
16
|
+
export declare const colors: {
|
|
17
|
+
/** Primary brand color (cyan) */
|
|
18
|
+
readonly brand: import("picocolors/types").Formatter;
|
|
19
|
+
/** Success state (green) */
|
|
20
|
+
readonly success: import("picocolors/types").Formatter;
|
|
21
|
+
/** Error state (red) */
|
|
22
|
+
readonly error: import("picocolors/types").Formatter;
|
|
23
|
+
/** Warning state (yellow) */
|
|
24
|
+
readonly warning: import("picocolors/types").Formatter;
|
|
25
|
+
/** Info state (blue) */
|
|
26
|
+
readonly info: import("picocolors/types").Formatter;
|
|
27
|
+
/** Muted/secondary text (gray) */
|
|
28
|
+
readonly muted: import("picocolors/types").Formatter;
|
|
29
|
+
/** Highlighted/accent text (magenta) */
|
|
30
|
+
readonly accent: import("picocolors/types").Formatter;
|
|
31
|
+
};
|
|
32
|
+
export type Colors = typeof colors;
|
|
33
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/ui/colors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH;;GAEG;AACH,eAAO,MAAM,MAAM;IAEjB,iCAAiC;;IAIjC,4BAA4B;;IAE5B,wBAAwB;;IAExB,6BAA6B;;IAE7B,wBAAwB;;IAIxB,kCAAkC;;IAElC,wCAAwC;;CAEhC,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System - Colors
|
|
3
|
+
*
|
|
4
|
+
* Centralized color palette for consistent terminal output.
|
|
5
|
+
* Uses picocolors for fast, lightweight ANSI color support.
|
|
6
|
+
*
|
|
7
|
+
* Respects NO_COLOR environment variable automatically.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* import { colors } from './colors';
|
|
11
|
+
* console.log(colors.success('Operation completed'));
|
|
12
|
+
*/
|
|
13
|
+
import pc from 'picocolors';
|
|
14
|
+
/**
|
|
15
|
+
* Semantic color palette for CLI output
|
|
16
|
+
*/
|
|
17
|
+
export const colors = {
|
|
18
|
+
// Brand colors
|
|
19
|
+
/** Primary brand color (cyan) */
|
|
20
|
+
brand: pc.cyan,
|
|
21
|
+
// Semantic colors
|
|
22
|
+
/** Success state (green) */
|
|
23
|
+
success: pc.green,
|
|
24
|
+
/** Error state (red) */
|
|
25
|
+
error: pc.red,
|
|
26
|
+
/** Warning state (yellow) */
|
|
27
|
+
warning: pc.yellow,
|
|
28
|
+
/** Info state (blue) */
|
|
29
|
+
info: pc.blue,
|
|
30
|
+
// Text modifiers
|
|
31
|
+
/** Muted/secondary text (gray) */
|
|
32
|
+
muted: pc.gray,
|
|
33
|
+
/** Highlighted/accent text (magenta) */
|
|
34
|
+
accent: pc.magenta,
|
|
35
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System - Text Formatters
|
|
3
|
+
*
|
|
4
|
+
* Text formatting utilities for consistent CLI output styling.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import { fmt } from './formatters';
|
|
8
|
+
* console.log(fmt.bold('Important'));
|
|
9
|
+
* console.log(fmt.heading('Section Title'));
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Text formatting functions
|
|
13
|
+
*/
|
|
14
|
+
export declare const fmt: {
|
|
15
|
+
/** Bold text */
|
|
16
|
+
readonly bold: import("picocolors/types.js").Formatter;
|
|
17
|
+
/** Dimmed/muted text */
|
|
18
|
+
readonly dim: import("picocolors/types.js").Formatter;
|
|
19
|
+
/** Italic text */
|
|
20
|
+
readonly italic: import("picocolors/types.js").Formatter;
|
|
21
|
+
/** Underlined text */
|
|
22
|
+
readonly underline: import("picocolors/types.js").Formatter;
|
|
23
|
+
/** Inverse (swap foreground/background) */
|
|
24
|
+
readonly inverse: import("picocolors/types.js").Formatter;
|
|
25
|
+
/** Heading style (bold + brand color) */
|
|
26
|
+
readonly heading: (text: string) => string;
|
|
27
|
+
/** Code/command style (cyan) */
|
|
28
|
+
readonly code: (text: string) => string;
|
|
29
|
+
/** Label style (bold + muted) */
|
|
30
|
+
readonly label: (text: string) => string;
|
|
31
|
+
/** Value style (normal) */
|
|
32
|
+
readonly value: (text: string) => string;
|
|
33
|
+
/** Version number style */
|
|
34
|
+
readonly version: (text: string) => string;
|
|
35
|
+
};
|
|
36
|
+
export type Formatters = typeof fmt;
|
|
37
|
+
//# sourceMappingURL=formatters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/ui/formatters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH;;GAEG;AACH,eAAO,MAAM,GAAG;IACd,gBAAgB;;IAEhB,wBAAwB;;IAExB,kBAAkB;;IAElB,sBAAsB;;IAEtB,2CAA2C;;IAK3C,yCAAyC;6BACzB,MAAM;IACtB,gCAAgC;0BACnB,MAAM;IACnB,iCAAiC;2BACnB,MAAM;IACpB,2BAA2B;2BACb,MAAM;IACpB,2BAA2B;6BACX,MAAM;CACd,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System - Text Formatters
|
|
3
|
+
*
|
|
4
|
+
* Text formatting utilities for consistent CLI output styling.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import { fmt } from './formatters';
|
|
8
|
+
* console.log(fmt.bold('Important'));
|
|
9
|
+
* console.log(fmt.heading('Section Title'));
|
|
10
|
+
*/
|
|
11
|
+
import pc from 'picocolors';
|
|
12
|
+
import { colors } from './colors.js';
|
|
13
|
+
/**
|
|
14
|
+
* Text formatting functions
|
|
15
|
+
*/
|
|
16
|
+
export const fmt = {
|
|
17
|
+
/** Bold text */
|
|
18
|
+
bold: pc.bold,
|
|
19
|
+
/** Dimmed/muted text */
|
|
20
|
+
dim: pc.dim,
|
|
21
|
+
/** Italic text */
|
|
22
|
+
italic: pc.italic,
|
|
23
|
+
/** Underlined text */
|
|
24
|
+
underline: pc.underline,
|
|
25
|
+
/** Inverse (swap foreground/background) */
|
|
26
|
+
inverse: pc.inverse,
|
|
27
|
+
// Semantic formatters
|
|
28
|
+
/** Heading style (bold + brand color) */
|
|
29
|
+
heading: (text) => pc.bold(colors.brand(text)),
|
|
30
|
+
/** Code/command style (cyan) */
|
|
31
|
+
code: (text) => colors.brand(text),
|
|
32
|
+
/** Label style (bold + muted) */
|
|
33
|
+
label: (text) => pc.bold(colors.muted(text)),
|
|
34
|
+
/** Value style (normal) */
|
|
35
|
+
value: (text) => text,
|
|
36
|
+
/** Version number style */
|
|
37
|
+
version: (text) => colors.muted(`v${text}`),
|
|
38
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System
|
|
3
|
+
*
|
|
4
|
+
* Unified design system for consistent terminal output.
|
|
5
|
+
* All CLI commands should use these utilities for visual consistency.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import { colors, symbols, fmt, messages } from '@/presentation/cli/ui';
|
|
9
|
+
*
|
|
10
|
+
* messages.success('Repository initialized');
|
|
11
|
+
* console.log(fmt.heading('Shep AI CLI'));
|
|
12
|
+
* console.log(`${colors.muted('Version:')} ${fmt.version('0.1.0')}`);
|
|
13
|
+
*/
|
|
14
|
+
export { colors, type Colors } from './colors.js';
|
|
15
|
+
export { symbols, type Symbols } from './symbols.js';
|
|
16
|
+
export { fmt, type Formatters } from './formatters.js';
|
|
17
|
+
export { messages, type Messages } from './messages.js';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System
|
|
3
|
+
*
|
|
4
|
+
* Unified design system for consistent terminal output.
|
|
5
|
+
* All CLI commands should use these utilities for visual consistency.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import { colors, symbols, fmt, messages } from '@/presentation/cli/ui';
|
|
9
|
+
*
|
|
10
|
+
* messages.success('Repository initialized');
|
|
11
|
+
* console.log(fmt.heading('Shep AI CLI'));
|
|
12
|
+
* console.log(`${colors.muted('Version:')} ${fmt.version('0.1.0')}`);
|
|
13
|
+
*/
|
|
14
|
+
export { colors } from './colors.js';
|
|
15
|
+
export { symbols } from './symbols.js';
|
|
16
|
+
export { fmt } from './formatters.js';
|
|
17
|
+
export { messages } from './messages.js';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System - Message Components
|
|
3
|
+
*
|
|
4
|
+
* Pre-styled message output functions for consistent CLI feedback.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import { messages } from './messages';
|
|
8
|
+
* messages.success('Repository initialized');
|
|
9
|
+
* messages.error('Failed to connect', new Error('timeout'));
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Message output functions
|
|
13
|
+
*/
|
|
14
|
+
export declare const messages: {
|
|
15
|
+
/**
|
|
16
|
+
* Print success message
|
|
17
|
+
* @example messages.success('Operation completed')
|
|
18
|
+
* // Output: ✓ Operation completed
|
|
19
|
+
*/
|
|
20
|
+
readonly success: (text: string) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Print error message
|
|
23
|
+
* @param text - Error message
|
|
24
|
+
* @param error - Optional error object (shown in debug mode)
|
|
25
|
+
* @example messages.error('Connection failed')
|
|
26
|
+
* // Output: ✗ Connection failed
|
|
27
|
+
*/
|
|
28
|
+
readonly error: (text: string, error?: Error) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Print warning message
|
|
31
|
+
* @example messages.warning('Config file not found, using defaults')
|
|
32
|
+
* // Output: ⚠ Config file not found, using defaults
|
|
33
|
+
*/
|
|
34
|
+
readonly warning: (text: string) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Print info message
|
|
37
|
+
* @example messages.info('Analyzing repository...')
|
|
38
|
+
* // Output: ℹ Analyzing repository...
|
|
39
|
+
*/
|
|
40
|
+
readonly info: (text: string) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Print debug message (only when DEBUG env var is set)
|
|
43
|
+
* @example messages.debug('Cache hit: features.json')
|
|
44
|
+
* // Output: › Cache hit: features.json (only in debug mode)
|
|
45
|
+
*/
|
|
46
|
+
readonly debug: (text: string) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Print a blank line
|
|
49
|
+
*/
|
|
50
|
+
readonly newline: () => void;
|
|
51
|
+
/**
|
|
52
|
+
* Print raw text without formatting
|
|
53
|
+
*/
|
|
54
|
+
readonly log: (text: string) => void;
|
|
55
|
+
};
|
|
56
|
+
export type Messages = typeof messages;
|
|
57
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/ui/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH;;GAEG;AACH,eAAO,MAAM,QAAQ;IACnB;;;;OAIG;6BACa,MAAM,KAAG,IAAI;IAI7B;;;;;;OAMG;2BACW,MAAM,UAAU,KAAK,KAAG,IAAI;IAO1C;;;;OAIG;6BACa,MAAM,KAAG,IAAI;IAI7B;;;;OAIG;0BACU,MAAM,KAAG,IAAI;IAI1B;;;;OAIG;2BACW,MAAM,KAAG,IAAI;IAM3B;;OAEG;4BACU,IAAI;IAIjB;;OAEG;yBACS,MAAM,KAAG,IAAI;CAGjB,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System - Message Components
|
|
3
|
+
*
|
|
4
|
+
* Pre-styled message output functions for consistent CLI feedback.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import { messages } from './messages';
|
|
8
|
+
* messages.success('Repository initialized');
|
|
9
|
+
* messages.error('Failed to connect', new Error('timeout'));
|
|
10
|
+
*/
|
|
11
|
+
import { colors } from './colors.js';
|
|
12
|
+
import { symbols } from './symbols.js';
|
|
13
|
+
/**
|
|
14
|
+
* Message output functions
|
|
15
|
+
*/
|
|
16
|
+
export const messages = {
|
|
17
|
+
/**
|
|
18
|
+
* Print success message
|
|
19
|
+
* @example messages.success('Operation completed')
|
|
20
|
+
* // Output: ✓ Operation completed
|
|
21
|
+
*/
|
|
22
|
+
success: (text) => {
|
|
23
|
+
console.log(colors.success(`${symbols.success} ${text}`));
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* Print error message
|
|
27
|
+
* @param text - Error message
|
|
28
|
+
* @param error - Optional error object (shown in debug mode)
|
|
29
|
+
* @example messages.error('Connection failed')
|
|
30
|
+
* // Output: ✗ Connection failed
|
|
31
|
+
*/
|
|
32
|
+
error: (text, error) => {
|
|
33
|
+
console.error(colors.error(`${symbols.error} ${text}`));
|
|
34
|
+
if (error && process.env.DEBUG) {
|
|
35
|
+
console.error(colors.muted(error.stack ?? error.message));
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* Print warning message
|
|
40
|
+
* @example messages.warning('Config file not found, using defaults')
|
|
41
|
+
* // Output: ⚠ Config file not found, using defaults
|
|
42
|
+
*/
|
|
43
|
+
warning: (text) => {
|
|
44
|
+
console.log(colors.warning(`${symbols.warning} ${text}`));
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* Print info message
|
|
48
|
+
* @example messages.info('Analyzing repository...')
|
|
49
|
+
* // Output: ℹ Analyzing repository...
|
|
50
|
+
*/
|
|
51
|
+
info: (text) => {
|
|
52
|
+
console.log(colors.info(`${symbols.info} ${text}`));
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* Print debug message (only when DEBUG env var is set)
|
|
56
|
+
* @example messages.debug('Cache hit: features.json')
|
|
57
|
+
* // Output: › Cache hit: features.json (only in debug mode)
|
|
58
|
+
*/
|
|
59
|
+
debug: (text) => {
|
|
60
|
+
if (process.env.DEBUG) {
|
|
61
|
+
console.log(colors.muted(`${symbols.pointer} ${text}`));
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* Print a blank line
|
|
66
|
+
*/
|
|
67
|
+
newline: () => {
|
|
68
|
+
console.log();
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Print raw text without formatting
|
|
72
|
+
*/
|
|
73
|
+
log: (text) => {
|
|
74
|
+
console.log(text);
|
|
75
|
+
},
|
|
76
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System - Symbols
|
|
3
|
+
*
|
|
4
|
+
* Unicode symbols for visual feedback in terminal output.
|
|
5
|
+
* Includes ASCII fallbacks for non-UTF8 terminals.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import { symbols } from './symbols';
|
|
9
|
+
* console.log(`${symbols.success} Done!`);
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Unicode symbols with ASCII fallbacks
|
|
13
|
+
*/
|
|
14
|
+
export declare const symbols: {
|
|
15
|
+
/** Success checkmark */
|
|
16
|
+
readonly success: "✓" | "√";
|
|
17
|
+
/** Error cross */
|
|
18
|
+
readonly error: "✗" | "×";
|
|
19
|
+
/** Warning triangle */
|
|
20
|
+
readonly warning: "⚠" | "‼";
|
|
21
|
+
/** Info circle */
|
|
22
|
+
readonly info: "ℹ" | "i";
|
|
23
|
+
/** Arrow/pointer */
|
|
24
|
+
readonly arrow: "→" | "->";
|
|
25
|
+
/** Bullet point */
|
|
26
|
+
readonly bullet: "•" | "*";
|
|
27
|
+
/** Pointer right */
|
|
28
|
+
readonly pointer: "❯" | ">";
|
|
29
|
+
/** Ellipsis for loading/truncation */
|
|
30
|
+
readonly ellipsis: "…" | "...";
|
|
31
|
+
/** Line separator */
|
|
32
|
+
readonly line: "─" | "-";
|
|
33
|
+
/** Spinner frames for loading animation */
|
|
34
|
+
readonly spinner: string[];
|
|
35
|
+
};
|
|
36
|
+
export type Symbols = typeof symbols;
|
|
37
|
+
//# sourceMappingURL=symbols.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/ui/symbols.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAkCH;;GAEG;AACH,eAAO,MAAM,OAAO;IAClB,wBAAwB;;IAExB,kBAAkB;;IAElB,uBAAuB;;IAEvB,kBAAkB;;IAElB,oBAAoB;;IAEpB,mBAAmB;;IAEnB,oBAAoB;;IAEpB,sCAAsC;;IAEtC,qBAAqB;;IAErB,2CAA2C;;CAEnC,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System - Symbols
|
|
3
|
+
*
|
|
4
|
+
* Unicode symbols for visual feedback in terminal output.
|
|
5
|
+
* Includes ASCII fallbacks for non-UTF8 terminals.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import { symbols } from './symbols';
|
|
9
|
+
* console.log(`${symbols.success} Done!`);
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Detect if terminal supports Unicode
|
|
13
|
+
*/
|
|
14
|
+
const isUnicodeSupported = () => {
|
|
15
|
+
// Windows Terminal and modern terminals support Unicode
|
|
16
|
+
if (process.env.WT_SESSION)
|
|
17
|
+
return true;
|
|
18
|
+
if (process.env.TERM_PROGRAM === 'vscode')
|
|
19
|
+
return true;
|
|
20
|
+
if (process.env.TERM === 'xterm-256color')
|
|
21
|
+
return true;
|
|
22
|
+
// Legacy Windows CMD/PowerShell may not
|
|
23
|
+
if (process.platform === 'win32') {
|
|
24
|
+
const { env } = process;
|
|
25
|
+
// Check for modern terminal indicators on Windows
|
|
26
|
+
const isModernTerminal = Boolean(env.CI) ||
|
|
27
|
+
Boolean(env.WT_SESSION) ||
|
|
28
|
+
Boolean(env.TERMINUS_SUBLIME) ||
|
|
29
|
+
env.ConEmuTask === '{cmd::Cmder}' ||
|
|
30
|
+
env.TERM_PROGRAM === 'Terminus-Sublime' ||
|
|
31
|
+
env.TERM_PROGRAM === 'vscode' ||
|
|
32
|
+
env.TERM === 'xterm-256color' ||
|
|
33
|
+
env.TERM === 'alacritty' ||
|
|
34
|
+
env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
|
|
35
|
+
return isModernTerminal;
|
|
36
|
+
}
|
|
37
|
+
// Unix-like systems generally support Unicode
|
|
38
|
+
return process.env.TERM !== 'linux';
|
|
39
|
+
};
|
|
40
|
+
const unicode = isUnicodeSupported();
|
|
41
|
+
/**
|
|
42
|
+
* Unicode symbols with ASCII fallbacks
|
|
43
|
+
*/
|
|
44
|
+
export const symbols = {
|
|
45
|
+
/** Success checkmark */
|
|
46
|
+
success: unicode ? '✓' : '√',
|
|
47
|
+
/** Error cross */
|
|
48
|
+
error: unicode ? '✗' : '×',
|
|
49
|
+
/** Warning triangle */
|
|
50
|
+
warning: unicode ? '⚠' : '‼',
|
|
51
|
+
/** Info circle */
|
|
52
|
+
info: unicode ? 'ℹ' : 'i',
|
|
53
|
+
/** Arrow/pointer */
|
|
54
|
+
arrow: unicode ? '→' : '->',
|
|
55
|
+
/** Bullet point */
|
|
56
|
+
bullet: unicode ? '•' : '*',
|
|
57
|
+
/** Pointer right */
|
|
58
|
+
pointer: unicode ? '❯' : '>',
|
|
59
|
+
/** Ellipsis for loading/truncation */
|
|
60
|
+
ellipsis: unicode ? '…' : '...',
|
|
61
|
+
/** Line separator */
|
|
62
|
+
line: unicode ? '─' : '-',
|
|
63
|
+
/** Spinner frames for loading animation */
|
|
64
|
+
spinner: unicode ? ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'] : ['|', '/', '-', '\\'],
|
|
65
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@shepai/cli",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Autonomous AI Native SDLC Platform - Automate the development cycle from idea to deploy",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Shep AI",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/shep-ai/cli.git"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"ai",
|
|
14
|
+
"sdlc",
|
|
15
|
+
"automation",
|
|
16
|
+
"cli",
|
|
17
|
+
"developer-tools",
|
|
18
|
+
"code-generation",
|
|
19
|
+
"langgraph"
|
|
20
|
+
],
|
|
21
|
+
"bin": {
|
|
22
|
+
"shep": "./dist/presentation/cli/index.js"
|
|
23
|
+
},
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"import": "./dist/index.js",
|
|
29
|
+
"types": "./dist/index.d.ts"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"dev": "vite",
|
|
42
|
+
"build": "tsc -p tsconfig.build.json",
|
|
43
|
+
"typecheck": "tsc --noEmit",
|
|
44
|
+
"test": "vitest run --passWithNoTests",
|
|
45
|
+
"test:watch": "vitest",
|
|
46
|
+
"test:unit": "vitest run tests/unit",
|
|
47
|
+
"test:int": "vitest run tests/integration",
|
|
48
|
+
"test:e2e": "vitest run tests/e2e",
|
|
49
|
+
"test:e2e:cli": "vitest run tests/e2e/cli",
|
|
50
|
+
"test:e2e:tui": "vitest run tests/e2e/tui",
|
|
51
|
+
"test:e2e:web": "vitest run tests/e2e/web",
|
|
52
|
+
"test:single": "vitest run",
|
|
53
|
+
"lint": "eslint .",
|
|
54
|
+
"lint:fix": "eslint . --fix",
|
|
55
|
+
"lint:tsp": "tsp compile tsp/ --no-emit",
|
|
56
|
+
"format": "prettier --write .",
|
|
57
|
+
"format:check": "prettier --check .",
|
|
58
|
+
"format:tsp": "tsp format \"tsp/**/*.tsp\"",
|
|
59
|
+
"cli": "tsx src/presentation/cli/index.ts",
|
|
60
|
+
"storybook": "storybook dev -p 6006",
|
|
61
|
+
"storybook:build": "storybook build",
|
|
62
|
+
"web:dev": "next dev",
|
|
63
|
+
"web:build": "next build",
|
|
64
|
+
"tsp:compile": "tsp compile tsp/",
|
|
65
|
+
"tsp:format": "tsp format \"tsp/**/*.tsp\"",
|
|
66
|
+
"tsp:watch": "tsp compile tsp/ --watch",
|
|
67
|
+
"prepare": "husky",
|
|
68
|
+
"validate": "pnpm run lint:fix && pnpm run format && pnpm run typecheck && pnpm run tsp:compile"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@commitlint/cli": "^19.0.0",
|
|
72
|
+
"@commitlint/config-conventional": "^19.0.0",
|
|
73
|
+
"@eslint/js": "^9.0.0",
|
|
74
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
75
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
76
|
+
"@semantic-release/git": "^10.0.1",
|
|
77
|
+
"@semantic-release/github": "^12.0.3",
|
|
78
|
+
"@semantic-release/npm": "^13.1.3",
|
|
79
|
+
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
80
|
+
"@types/node": "^25.2.0",
|
|
81
|
+
"@typespec/compiler": "^0.60.0",
|
|
82
|
+
"@typespec/json-schema": "^0.60.0",
|
|
83
|
+
"@typespec/openapi3": "^0.60.0",
|
|
84
|
+
"@typespec/prettier-plugin-typespec": "^0.60.0",
|
|
85
|
+
"@typespec/protobuf": "^0.60.0",
|
|
86
|
+
"eslint": "^9.0.0",
|
|
87
|
+
"eslint-config-prettier": "^10.0.0",
|
|
88
|
+
"husky": "^9.0.0",
|
|
89
|
+
"lint-staged": "^15.0.0",
|
|
90
|
+
"prettier": "^3.0.0",
|
|
91
|
+
"semantic-release": "^25.0.3",
|
|
92
|
+
"tsx": "^4.21.0",
|
|
93
|
+
"typescript": "^5.3.0",
|
|
94
|
+
"typescript-eslint": "^8.0.0",
|
|
95
|
+
"vite": "^7.3.1",
|
|
96
|
+
"vitest": "^4.0.18"
|
|
97
|
+
},
|
|
98
|
+
"engines": {
|
|
99
|
+
"node": ">=18.0.0",
|
|
100
|
+
"pnpm": ">=8.0.0"
|
|
101
|
+
},
|
|
102
|
+
"packageManager": "pnpm@9.0.0",
|
|
103
|
+
"dependencies": {
|
|
104
|
+
"commander": "^14.0.3",
|
|
105
|
+
"picocolors": "^1.1.1"
|
|
106
|
+
}
|
|
107
|
+
}
|