vibecodingmachine-cli 1.0.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.
Files changed (44) hide show
  1. package/.allnightai/REQUIREMENTS.md +11 -0
  2. package/.allnightai/temp/auto-status.json +6 -0
  3. package/.env +7 -0
  4. package/.eslintrc.js +16 -0
  5. package/README.md +85 -0
  6. package/bin/vibecodingmachine.js +274 -0
  7. package/jest.config.js +8 -0
  8. package/logs/audit/2025-11-07.jsonl +2 -0
  9. package/package.json +64 -0
  10. package/scripts/README.md +128 -0
  11. package/scripts/auto-start-wrapper.sh +92 -0
  12. package/scripts/postinstall.js +81 -0
  13. package/src/commands/auth.js +96 -0
  14. package/src/commands/auto-direct.js +1748 -0
  15. package/src/commands/auto.js +4692 -0
  16. package/src/commands/auto.js.bak +710 -0
  17. package/src/commands/ide.js +70 -0
  18. package/src/commands/repo.js +159 -0
  19. package/src/commands/requirements.js +161 -0
  20. package/src/commands/setup.js +91 -0
  21. package/src/commands/status.js +88 -0
  22. package/src/components/RequirementPage.js +0 -0
  23. package/src/file.js +0 -0
  24. package/src/index.js +5 -0
  25. package/src/main.js +0 -0
  26. package/src/ui/requirements-page.js +0 -0
  27. package/src/utils/auth.js +548 -0
  28. package/src/utils/auto-mode-ansi-ui.js +238 -0
  29. package/src/utils/auto-mode-simple-ui.js +161 -0
  30. package/src/utils/auto-mode-ui.js.bak.blessed +207 -0
  31. package/src/utils/auto-mode.js +65 -0
  32. package/src/utils/config.js +64 -0
  33. package/src/utils/interactive.js +3616 -0
  34. package/src/utils/keyboard-handler.js +152 -0
  35. package/src/utils/logger.js +4 -0
  36. package/src/utils/persistent-header.js +116 -0
  37. package/src/utils/provider-registry.js +128 -0
  38. package/src/utils/requirementUtils.js +0 -0
  39. package/src/utils/status-card.js +120 -0
  40. package/src/utils/status-manager.js +0 -0
  41. package/src/utils/status.js +0 -0
  42. package/src/utils/stdout-interceptor.js +127 -0
  43. package/tests/auto-mode.test.js +37 -0
  44. package/tests/config.test.js +34 -0
@@ -0,0 +1,64 @@
1
+ const path = require('path');
2
+ const os = require('os');
3
+ const fs = require('fs-extra');
4
+
5
+ const DEFAULT_CONFIG_DIR = path.join(os.homedir(), '.config', 'allnightai');
6
+ const DEFAULT_CONFIG_PATH = path.join(DEFAULT_CONFIG_DIR, 'config.json');
7
+
8
+ function getConfigPath() {
9
+ const override = process.env.ALLNIGHTAI_CONFIG_PATH;
10
+ if (override) return override;
11
+ return DEFAULT_CONFIG_PATH;
12
+ }
13
+
14
+ async function ensureConfigFile() {
15
+ const cfgPath = getConfigPath();
16
+ await fs.ensureDir(path.dirname(cfgPath));
17
+ if (!await fs.pathExists(cfgPath)) {
18
+ const defaultConfig = { repoPath: null, auto: {} };
19
+ await fs.writeJson(cfgPath, defaultConfig, { spaces: 2 });
20
+ }
21
+ }
22
+
23
+ async function readConfig() {
24
+ await ensureConfigFile();
25
+ return fs.readJson(getConfigPath());
26
+ }
27
+
28
+ async function writeConfig(config) {
29
+ await fs.writeJson(getConfigPath(), config, { spaces: 2 });
30
+ }
31
+
32
+ async function getRepoPath() {
33
+ const cfg = await readConfig();
34
+ return cfg.repoPath || null;
35
+ }
36
+
37
+ async function setRepoPath(repoPath) {
38
+ const cfg = await readConfig();
39
+ cfg.repoPath = repoPath;
40
+ await writeConfig(cfg);
41
+ }
42
+
43
+ async function getAutoConfig() {
44
+ const cfg = await readConfig();
45
+ return cfg.auto || {};
46
+ }
47
+
48
+ async function setAutoConfig(autoConfig) {
49
+ const cfg = await readConfig();
50
+ // Merge with existing auto config to preserve fields like aiderModel
51
+ cfg.auto = { ...(cfg.auto || {}), ...(autoConfig || {}) };
52
+ await writeConfig(cfg);
53
+ }
54
+
55
+ module.exports = {
56
+ getRepoPath,
57
+ setRepoPath,
58
+ getAutoConfig,
59
+ setAutoConfig,
60
+ readConfig,
61
+ writeConfig
62
+ };
63
+
64
+