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
110 changes: 30 additions & 80 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

**Stop manually setting up your development environment. Define it once, replicate it everywhere.**

Codify is a command-line tool that brings the power of Infrastructure as Code (IaC) to your local development machine. Manage system settings, install packages, configure tools, and automate your entire setup using a simple, declarative configuration file—just like you manage your infrastructure with Terraform.
Codify is a command-line tool that brings the power of Infrastructure as Code (IaC) to your local development machine. Manage system settings, install packages, configure tools, and automate your setup using a simple, declarative configuration file. It's like Terraform but for your local machine.

<p align="center">
<a href="https://codifycli.com">Website</a> •
<a href="https://dashboard.codifycli.com">Web Editor</a> •
<a href="https://docs.codifycli.com">Documentation</a>
<a href="https://codifycli.com/docs">Documentation</a>
</p>

<p align="center">
Expand All @@ -24,7 +24,6 @@ Every developer has been there:
- **New machine?** Spend hours reinstalling and configuring everything
- **Team onboarding?** Send them a scattered wiki page of manual installation steps
- **Multiple machines?** Keep them in sync manually
- **What's installed?** No clear record of your development environment
- **Configuration drift?** Your laptop works differently than your colleague's

## The Solution
Expand All @@ -47,19 +46,19 @@ With Codify, your entire development environment is defined in a single `codify.
```

Now you can:
- **See what changes** before applying them with `codify plan`
- **Apply changes** automatically with `codify apply`
- **Version control** your environment setup
- **Share configurations** with your team
- **Replicate setups** across multiple machines in minutes
- **See what changes** before applying them with `codify plan`
- **Apply changes** automatically with `codify apply`
- **Version control** your environment setup
- **Share configurations** with your team
- **Replicate setups** across multiple machines in minutes

## Key Features

### 🎯 **Declarative Configuration**
### **Declarative Configuration**
Define your entire development environment in a single, readable configuration file. No more shell scripts or scattered installation instructions.

### 🔍 **Plan Before You Apply**
Like Terraform, Codify shows you exactly what changes will be made before executing them. No surprises.
### **Plan Before You Apply**
Like Terraform, Codify shows you exactly what changes will be made before executing them.

```bash
$ codify plan
Expand Down Expand Up @@ -87,8 +86,8 @@ Do you want to apply the above changes?
No
```

### 📥 **Import Your Current Setup**
Already have a configured machine? Generate a Codify configuration from your existing setup in seconds:
### **Import Your Current Setup**
Already have a configured machine? Generate a Codify configuration from your existing setup:

```bash
$ codify init
Expand All @@ -109,29 +108,28 @@ Use <space> to select and <return> to submit.
Use <a> to select all items and <d> to de-select all items.
```

### 🔌 **Extensible Plugin System**
### **Extensible Plugin System**
Out-of-the-box support for:
- **Homebrew** (formulae and casks)
- **VS Code** (extensions and settings)
- **npm** global packages
- **macOS** system preferences
- **Git** configuration
- And [many more](https://docs.codifycli.com/plugins)...
- And [many more](https://codifycli.com/docs/plugins)...

Don't see what you need? Create your own plugin in minutes.
Don't see what you need? [Create your own plugin](https://codifycli.com/docs/plugins).

### 🌐 **Web-Based Editor**
Edit your configuration in a beautiful web interface at [dashboard.codifycli.com](https://dashboard.codifycli.com):
- 🎨 Intuitive UI with auto-completion
- 🔄 Real-time validation
- ☁️ Cloud sync across devices
- 🤝 Share configurations with your team
### **Web-Based Editor**
Edit your configuration in a web interface at [dashboard.codifycli.com](https://dashboard.codifycli.com):
- Intuitive UI with auto-completion
- Real-time validation
- Cloud sync across devices
- Share configurations with your team

### 🔒 **Safe & Secure**
### **Safe & Secure**
- Preview all changes before applying
- Sudo password prompts only when needed
- Secure mode for extra protection
- Open source and Apache 2.0 licensed
- Both the CLI tool and default plugin are open source and Apache 2.0 licensed
- Requests your password each time elevated privileges (sudo) is required.

## Quick Start

Expand Down Expand Up @@ -175,14 +173,6 @@ codify plan
codify apply
```

### Pro Tip: Use the Web Editor

Visit [dashboard.codifycli.com](https://dashboard.codifycli.com) for a guided, visual way to build your configuration with:
- Auto-complete for all available packages
- Real-time validation
- Cloud storage and sync
- Shareable configurations

## Common Commands

| Command | Description |
Expand All @@ -198,26 +188,6 @@ Visit [dashboard.codifycli.com](https://dashboard.codifycli.com) for a guided, v

Run `codify --help` for a complete list of commands and options.

## Real-World Use Cases

### **Individual Developers**
- Keep multiple machines (work laptop, personal laptop, desktop) in sync
- Quickly recover from system reinstalls or upgrades
- Document your development environment as code
- Try out new tools without the hassle of installing them

### **Development Teams**
- Onboard new developers in minutes instead of days
- Ensure everyone has the same development environment
- Share team configurations via Git or the [Codify editor](https://dashboard.codifycli.com)
- Reduce "works on my machine" problems

### **Organizations**
- Standardize development environments across teams
- Maintain compliance with required tools and versions
- Reduce IT support burden for developer setup
- Break down barriers between teams and departments

## Example Configurations

### Full-Stack JavaScript Developer
Expand Down Expand Up @@ -298,41 +268,21 @@ Run `codify --help` for a complete list of commands and options.
]
```

## Why Codify vs. Alternatives?

| Feature | Codify | Homebrew Bundle | Shell Scripts | Manual Setup |
|----------------------------------|:------:|:---------------:|:-------------:|:------------:|
| Declarative configuration | ✅ | ✅ | ❌ | ❌ |
| Plan before apply | ✅ | ❌ | ❌ | ❌ |
| Import existing setup | ✅ | ❌ | ❌ | ❌ |
| Multi-format support | ✅ | ❌ | ❌ | ❌ |
| Web-based editor | ✅ | ❌ | ❌ | ❌ |
| Cross-tool management | ✅ | ❌ | ⚠️ | ❌ |
| Extensible plugins | ✅ | ❌ | ⚠️ | ❌ |
| Cloud sync | ✅ | ❌ | ❌ | ❌ |
| Update detection | ✅ | ✅ | ❌ | ❌ |

## Frequently Asked Questions

**Q: Does Codify work on Linux and Windows?**
A: Codify currently supports macOS and Linux. Windows support works via WSL.

**Q: Can I use Codify with my existing Homebrew setup?**
A: Yes! Run `codify init` to import your existing packages into a Codify configuration.

**Q: Is my sudo password stored?**
A: No. Codify only caches your password in memory during a session and prompts when needed. Use `--secure` mode for extra protection.

**Q: How is this different from Ansible/Chef/Puppet?**
A: Those tools are designed for server configuration management. Codify is purpose-built for local development environments with a focus on simplicity and developer experience.

## Community & Support

- 📚 **Documentation**: [docs.codifycli.com](https://docs.codifycli.com)
- 🐛 **Issues**: [GitHub Issues](https://github.com/codifycli/codify/issues)
- 💬 **Default Plugin**: [GitHub Default Plugin](https://github.com/codifycli/default-plugin)
- 🌐 **Website**: [codifycli.com](https://codifycli.com)
- ☁️ **Editor**: [dashboard.codifycli.com](https://dashboard.codifycli.com)
- **Documentation**: [codifycli.com/docs](https://codifycli.com/docs)
- **Issues**: [GitHub Issues](https://github.com/codifycli/codify/issues)
- **Default Plugin**: [GitHub Default Plugin](https://github.com/codifycli/default-plugin)
- **Website**: [codifycli.com](https://codifycli.com)
- **Editor**: [dashboard.codifycli.com](https://dashboard.codifycli.com)

## Contributing

Expand All @@ -351,5 +301,5 @@ This project is licensed under the [Apache 2.0 License](LICENSE).
<p align="center">
<a href="https://codifycli.com">codifycli.com</a> •
<a href="https://github.com/codifycli/codify">GitHub</a> •
<a href="https://docs.codifycli.com">Docs</a>
<a href="https://codifycli.com/docs">Docs</a>
</p>
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@
"version": "oclif readme && git add README.md",
"start:dev": "./bin/dev.js",
"start:vm": "npm run build && npm run pack:macos && npm run start:vm",
"deploy": "npm run pkg && npm run notarize && npm run upload"
"deploy": "npm run pkg && npm run notarize && npm run upload",
"prepublishOnly": "npm run build"
},
"version": "1.0.0",
"version": "1.0.1",
"bugs": "https://github.com/codifycli/codify/issues",
"keywords": [
"oclif",
Expand Down
2 changes: 1 addition & 1 deletion scripts/install-beta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ SCRIPT
CYAN='\033[0;36m'
END_ESCAPE='\033[0m'

printf "${CYAN}\n🎉 %s 🎉\n%s${END_ESCAPE}\n" "Successfully installed Codify. Type codify --help for a list of commands." "Visit the documentation at https://docs.codifycli.com for more info."
printf "${CYAN}\n🎉 %s 🎉\n%s${END_ESCAPE}\n" "Successfully installed Codify. Type codify --help for a list of commands." "Visit the documentation at https://codifycli.com/docs for more info."
exit 0;
}
16 changes: 12 additions & 4 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
if [ "\$ARCH" == "x86_64" ]; then
ARCH=x64
elif [[ "\$ARCH" == aarch* ]]; then
ARCH=arm
ARCH=arm64
elif [[ "\$ARCH" == "arm64" ]]; then
ARCH=arm64
else
Expand All @@ -56,9 +56,17 @@
fi
echo "Installing CLI from \$URL"
if [ \$(command -v curl) ]; then
curl "\$URL" | tar "\$TAR_ARGS"
if [ "\$OS" = "darwin" ]; then
curl "\$URL" | tar "\$TAR_ARGS"
else
curl "\$URL" | tar "\$TAR_ARGS" --warning=no-unknown-keyword
fi
else
wget -O- "\$URL" | tar "\$TAR_ARGS"
if [ "\$OS" = "darwin" ]; then
wget -O- "\$URL" | tar "\$TAR_ARGS"
else
wget -O- "\$URL" | tar "\$TAR_ARGS" --warning=no-unknown-keyword
fi
fi
# delete old codify bin if exists
rm -f \$(command -v codify) || true
Expand All @@ -76,6 +84,6 @@ SCRIPT
CYAN='\033[0;36m'
END_ESCAPE='\033[0m'

printf "${CYAN}\n🎉 %s 🎉\n%s${END_ESCAPE}\n" "Successfully installed Codify. Type codify --help for a list of commands." "Visit the documentation at https://docs.codifycli.com for more info."
printf "${CYAN}\n🎉 %s 🎉\n%s${END_ESCAPE}\n" "Successfully installed Codify. Type codify --help for a list of commands." "Visit the documentation at https://codifycli.com/docs for more info."
exit 0;
}
2 changes: 1 addition & 1 deletion src/commands/apply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ any changes.
For scripts: use ${chalk.bold.bgMagenta(' --output json ')} which will skip approval and
apply changes directly.

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

static flags = {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class Connect extends BaseCommand {
`Open a connection to the Codify dashboard. This command will host a local server to receive commands (e.g. apply, destroy, etc.)
from the Codify dashboard.

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

static flags = {}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/destroy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ with a matching type.
• 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`
For more information, visit: https://codifycli.com/docs/commands/destory`

static examples = [
'<%= config.bin %> <%= command.id %> homebrew nvm',
Expand Down
2 changes: 1 addition & 1 deletion src/commands/edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class Edit extends BaseCommand {
static description =
`Short cut for opening your default Codify file in the Codify dashboard.

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

static flags = {}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The results can be saved in one of three ways:

Codify will attempt to smartly insert new configurations while preserving existing spacing and formatting.

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

static override examples = [
'<%= config.bin %> <%= command.id %> homebrew nvm asdf',
Expand Down
2 changes: 1 addition & 1 deletion src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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.jsonc ')}.

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

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

By default opens a browser window to login. If username and password are provided, it will attempt to login via CLI.

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

static baseFlags = {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/logout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class Login extends BaseCommand {
static description =
`Logout of Codify cloud account

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

static flags = {}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ the desired configuration to compute the execution plan.
For scripts: use ${chalk.bold.bgMagenta(' --output json ')} which will skip all prompts and print
only the final result as a json.

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

static examples = [
'<%= config.bin %> <%= command.id %>',
Expand Down
2 changes: 1 addition & 1 deletion src/commands/refresh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Leave empty to refresh all resources.

Codify will attempt to smartly insert new configurations while preserving existing spacing and formatting.

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

static override examples = [
'<%= config.bin %> <%= command.id %> homebrew nvm asdf',
Expand Down
4 changes: 2 additions & 2 deletions src/commands/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ any changes.
For scripts: use ${chalk.bold.bgMagenta(' --output json ')} which will skip approval and
apply changes directly.

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

static flags = {
Expand Down Expand Up @@ -48,7 +48,7 @@ For more information, visit: https://docs.codifycli.com/commands/apply
]

async init(): Promise<void> {
ctx.log('Running Codify test...')
console.log('Running Codify test...')
return super.init();
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class Validate extends BaseCommand {
static description =
`Validate a codify.jsonc/codify.json/codify.yaml file.

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

static flags = {}
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const VERSION = (await import("../package.json", { assert: { type: "json" } })).default.version;
export const VERSION = (await import("../package.json", { with: { type: "json" } })).default.version;

export const config = {
loginServerPort: 51_039,
Expand Down
4 changes: 2 additions & 2 deletions src/connect/http-routes/handlers/test-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ export function testHandler() {

session.additionalData.filePath = filePath;

return spawn(ShellUtils.getDefaultShell(), ['-c', `${ConnectOrchestrator.nodeBinary} ${ConnectOrchestrator.rootCommand} test`], {
return spawn(ShellUtils.getDefaultShell(), ['-c', `${ConnectOrchestrator.nodeBinary} ${ConnectOrchestrator.rootCommand} test -p ${filePath}`], {
name: 'xterm-color',
cols: 80,
rows: 30,
cwd: filePath,
cwd: process.env.HOME,
env: process.env
});
}
Expand Down
Loading
Loading