Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g codify
$ codify COMMAND
running command...
$ codify (--version)
codify/0.7.1 darwin-arm64 node-v20.15.1
codify/0.7.2 darwin-arm64 node-v20.15.1
$ codify --help [COMMAND]
USAGE
$ codify COMMAND
Expand All @@ -37,7 +37,7 @@ USAGE

## `codify apply`

Install or update resources on the system based on a codify.json file.
Install or update resources on the system based on a codify.jsonc file.

```
USAGE
Expand All @@ -51,7 +51,7 @@ FLAGS
--debug Print additional debug logs.

DESCRIPTION
Install or update resources on the system based on a codify.json file.
Install or update resources on the system based on a codify.jsonc file.

Codify first generates a plan to determine the necessary execution steps. See
codify plan --help for more details.
Expand All @@ -74,7 +74,7 @@ EXAMPLES
$ codify apply -S <sudo password>
```

_See code: [src/commands/apply.ts](https://github.com/kevinwang5658/codify/blob/v0.7.1/src/commands/apply.ts)_
_See code: [src/commands/apply.ts](https://github.com/kevinwang5658/codify/blob/v0.7.2/src/commands/apply.ts)_

## `codify destroy`

Expand All @@ -95,7 +95,7 @@ DESCRIPTION
Use Codify to uninstall a supported package or setting on the system.

This command will only work for resources with Codify support. This command
can work with or without a codify.json file.
can work with or without a codify.jsonc file.

Modes:
• If a codify.json file exists, destroy the resource specified in the Codify.json file
Expand All @@ -113,7 +113,7 @@ EXAMPLES
$ codify destroy
```

_See code: [src/commands/destroy.ts](https://github.com/kevinwang5658/codify/blob/v0.7.1/src/commands/destroy.ts)_
_See code: [src/commands/destroy.ts](https://github.com/kevinwang5658/codify/blob/v0.7.2/src/commands/destroy.ts)_

## `codify help [COMMAND]`

Expand Down Expand Up @@ -189,7 +189,7 @@ EXAMPLES
$ codify import \*
```

_See code: [src/commands/import.ts](https://github.com/kevinwang5658/codify/blob/v0.7.1/src/commands/import.ts)_
_See code: [src/commands/import.ts](https://github.com/kevinwang5658/codify/blob/v0.7.2/src/commands/import.ts)_

## `codify init`

Expand Down Expand Up @@ -217,7 +217,7 @@ EXAMPLES
$ codify init
```

_See code: [src/commands/init.ts](https://github.com/kevinwang5658/codify/blob/v0.7.1/src/commands/init.ts)_
_See code: [src/commands/init.ts](https://github.com/kevinwang5658/codify/blob/v0.7.2/src/commands/init.ts)_

## `codify plan`

Expand Down Expand Up @@ -254,7 +254,7 @@ EXAMPLES
$ codify plan -p ../
```

_See code: [src/commands/plan.ts](https://github.com/kevinwang5658/codify/blob/v0.7.1/src/commands/plan.ts)_
_See code: [src/commands/plan.ts](https://github.com/kevinwang5658/codify/blob/v0.7.2/src/commands/plan.ts)_

## `codify update [CHANNEL]`

Expand Down
13 changes: 0 additions & 13 deletions codify.json

This file was deleted.

97 changes: 80 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"codify": "./bin/run.js"
},
"dependencies": {
"@codifycli/ink-form": "0.0.11",
"@codifycli/ink-form": "0.0.12",
"@homebridge/node-pty-prebuilt-multiarch": "^0.12.0-beta.5",
"@inkjs/ui": "^2",
"@oclif/core": "^4.0.8",
Expand All @@ -31,7 +31,10 @@
"parse-json": "^8.1.0",
"react": "^18.3.1",
"semver": "^7.5.4",
"supports-color": "^9.4.0"
"supports-color": "^9.4.0",
"json5": "^2.2.3",
"@mischnic/json-sourcemap": "^0.1.1",
"jju": "^1.4.0"
},
"description": "Codify allows users to configure settings, install new packages, and automate their systems using code instead of the GUI. Get set up on a new laptop in one click, maintain a Codify file within your project so anyone can get started and never lose your cool apps or favourite settings again.",
"devDependencies": {
Expand All @@ -46,7 +49,9 @@
"@types/react": "^18.3.1",
"@types/semver": "^7.5.4",
"@types/strip-ansi": "^5.2.1",
"@types/jju": "^1.4.5",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@types/json5": "^2.2.0",
"codify-plugin-lib": "^1.0.151",
"esbuild": "^0.24.0",
"esbuild-plugin-copy": "^2.1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/apply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ApplyOrchestrator } from '../orchestrators/apply.js';

export default class Apply extends BaseCommand {
static description =
`Install or update resources on the system based on a codify.json file.
`Install or update resources on the system based on a codify.jsonc file.

Codify first generates a plan to determine the necessary execution steps. See
${chalk.bold.bgMagenta(' codify plan --help ')} for more details.
Expand Down
6 changes: 3 additions & 3 deletions src/commands/destroy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ export default class Destroy extends BaseCommand {
`Use Codify to uninstall a supported package or setting on the system.

This command will only work for resources with Codify support. This command
can work with or without a codify.json file.
can work with or without a codify.jsonc file.

${chalk.bold('Modes:')}
• If a codify.json file exists, destroy the resource specified in the Codify.json file
• If a codify.jsonc file exists, destroy the resource specified in the Codify.jsonc file
with a matching type.
• If a codify.json file doesn't exist, additional information may be asked to identify
• If a codify.jsonc file doesn't exist, additional information may be asked to identify
the specific resource to destroy.

For more information, visit: https://docs.codifycli.com/commands/destory`
Expand Down
6 changes: 3 additions & 3 deletions src/commands/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export default class Import extends BaseCommand {
`Generate Codify configurations from already installed packages.

Use a space-separated list of arguments to specify the resource types to import.
If a codify.json file already exists, omit arguments to update the file to match the system.
If a codify.jsonc file already exists, omit arguments to update the file to match the system.

${chalk.bold('Modes:')}
1. ${chalk.bold('No args:')} If no args are specified and an *.codify.json already exists, Codify
1. ${chalk.bold('No args:')} If no args are specified and an *.codify.jsonc already exists, Codify
will update the existing file with new changes on the system.

${chalk.underline('Command:')}
Expand All @@ -30,7 +30,7 @@ codify import nvm asdf*
codify import \\* (for importing all supported resources)

The results can be saved in one of three ways:
a. To an existing *.codify.json file
a. To an existing *.codify.jsonc file
b. To a new file
c. Printed to the console only

Expand Down
2 changes: 1 addition & 1 deletion src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class Init extends BaseCommand {

Use this command to automatically generate Codify configs based on
the currently installed system resources. By default, the new file
will be written to ${chalk.bold.bgMagenta(' ~/codify.json ')}.
will be written to ${chalk.bold.bgMagenta(' ~/codify.jsonc ')}.

For more information, visit: https://docs.codifycli.com/commands/init`

Expand Down
4 changes: 2 additions & 2 deletions src/commands/plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { PlanOrchestrator } from '../orchestrators/plan.js';

export default class Plan extends BaseCommand {
static description =
`Generate an execution plan to apply changes from a codify.json file.
`Generate an execution plan to apply changes from a codify.jsonc file.

This plan lists all the changes Codify needs to make to apply the codify.json file.
This plan lists all the changes Codify needs to make to apply the codify.jsonc file.
The plan will not be executed. Behind the scenes, Codify performs a refresh scan to
determine the current configuration and installed resources, then compares them with
the desired configuration to compute the execution plan.
Expand Down
2 changes: 1 addition & 1 deletion src/common/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class SyntaxError extends CodifyError {
}

formattedMessage(): string {
return `Syntax error: found in codify.json: ${this.message}`
return `Syntax error: found in ${this.fileName}: ${this.message}`
}
}

Expand Down
Loading