@damper/cli 0.1.0

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.
@@ -0,0 +1,7 @@
1
+ export interface CliConfig {
2
+ defaultType?: 'bug' | 'feature' | 'improvement' | 'task';
3
+ defaultStatus?: 'planned' | 'in_progress' | 'done' | 'all';
4
+ }
5
+ export declare function getConfig(): CliConfig;
6
+ export declare function setConfig(config: CliConfig): void;
7
+ export declare function getApiKey(): string | undefined;
@@ -0,0 +1,32 @@
1
+ import * as fs from 'node:fs';
2
+ import * as path from 'node:path';
3
+ import * as os from 'node:os';
4
+ const CONFIG_DIR = path.join(os.homedir(), '.damper');
5
+ const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
6
+ function ensureConfigDir() {
7
+ if (!fs.existsSync(CONFIG_DIR)) {
8
+ fs.mkdirSync(CONFIG_DIR, { recursive: true });
9
+ }
10
+ }
11
+ export function getConfig() {
12
+ ensureConfigDir();
13
+ if (!fs.existsSync(CONFIG_FILE)) {
14
+ return {};
15
+ }
16
+ try {
17
+ const content = fs.readFileSync(CONFIG_FILE, 'utf-8');
18
+ return JSON.parse(content);
19
+ }
20
+ catch {
21
+ return {};
22
+ }
23
+ }
24
+ export function setConfig(config) {
25
+ ensureConfigDir();
26
+ const current = getConfig();
27
+ const merged = { ...current, ...config };
28
+ fs.writeFileSync(CONFIG_FILE, JSON.stringify(merged, null, 2));
29
+ }
30
+ export function getApiKey() {
31
+ return process.env.DAMPER_API_KEY;
32
+ }
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@damper/cli",
3
+ "version": "0.1.0",
4
+ "description": "CLI tool for orchestrating Damper task workflows with Claude Code",
5
+ "author": "Damper <hello@usedamper.com>",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/usedamper/damper.git",
9
+ "directory": "packages/cli"
10
+ },
11
+ "homepage": "https://usedamper.com",
12
+ "type": "module",
13
+ "bin": {
14
+ "damper-cli": "./dist/index.js"
15
+ },
16
+ "main": "./dist/index.js",
17
+ "types": "./dist/index.d.ts",
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "scripts": {
22
+ "build": "tsc",
23
+ "dev": "tsx src/index.ts",
24
+ "test": "bun test",
25
+ "prepublishOnly": "bun run build"
26
+ },
27
+ "dependencies": {
28
+ "@inquirer/prompts": "^7.0.0",
29
+ "execa": "^9.0.0",
30
+ "picocolors": "^1.1.0",
31
+ "zod": "^3.25.0"
32
+ },
33
+ "devDependencies": {
34
+ "@types/node": "^22.0.0",
35
+ "tsx": "^4.0.0",
36
+ "typescript": "^5.3.0"
37
+ },
38
+ "engines": {
39
+ "node": ">=18"
40
+ },
41
+ "keywords": [
42
+ "damper",
43
+ "cli",
44
+ "claude",
45
+ "ai",
46
+ "task-management",
47
+ "worktree"
48
+ ],
49
+ "license": "MIT"
50
+ }