| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Note
If you just want to use it, run:
curl --proto '=https' --tlsv1.2 -fsSL https://devmagic.run/install | bash(P.S.: It is always recommended to see what you are running before doing so. The --proto '=https' --tlsv1.2 flags refuse to silently downgrade to plain HTTP or an old TLS version — same ones rustup and other installers use. Plain curl -fsSL ... | bash works too, just without that hardening.)
DevMagic can be used in three different ways:
It also supports optional auxiliary services (see .devcontainer/docker-compose.yml for available options).
This repository contains the core configuration for the DevMagic development environment. You can add it to your existing projects with a single command, use it as a standalone workspace, or use it to develop DevMagic itself (including the website hosted at devmagic.run).
The easiest way to use DevMagic is to add it to your existing project:
curl --proto '=https' --tlsv1.2 -fsSL https://devmagic.run/install | bashThis downloads the DevMagic templates (from templates/devcontainer/), fills in your project name, and writes ready-to-use files into a .devcontainer/ folder in the current directory:
Every value that must match across the files (workspace mount path, Compose project name, hostname, image tag) is generated in sync from your project folder name — no .env files, no placeholders, nothing to keep aligned by hand.
Need different values? The project name and the container username can be overridden (flags > env vars > defaults):
# URL query params:
curl -fsSL "https://devmagic.run/install?name=my-app&user=node" | bash
# Flags:
curl -fsSL https://devmagic.run/install | bash -s -- --name my-app --user node
# Environment variables:
curl -fsSL https://devmagic.run/install | DEVMAGIC_PROJECT_NAME=my-app DEVMAGIC_USER=node bashAfter running the installer:
The dev container includes:
Note
This setup targets Docker. It should also work with Podman, but building through the Compose build: block can be unreliable there — see the note at the top of .devcontainer/docker-compose.yml for the manual-build alternative.
Each file has a clear responsibility:
If you rename your project folder, rerun the installer (or edit the project name consistently in both devcontainer.json and docker-compose.yml — the file headers list the affected values).
See the official features list for available options.
The devcontainer isn't the only thing DevMagic can set up. The same endpoint installs other new-project defaults from templates/ — an .editorconfig, a Node .gitignore, Prettier config, git-cliff changelog tooling, and more:
curl -fsSL https://devmagic.run/install/editorconfig | bash
curl -fsSL https://devmagic.run/install/gitignore | bash
curl -fsSL https://devmagic.run/install/changelog | bashExisting files are never overwritten unless you add ?force=1 to the URL. Browse the full catalog at devmagic.run/install-scripts.
You can use this repository directly as your dev environment. This is useful if:
Clone this repository:
git clone https://github.com/marcelocra/devmagic.git
cd devmagic💡 If you don't have git installed locally, you can download the repo as a zip from GitHub, since this environment itself provides Git.
Open the folder in VS Code and choose "Reopen in Container."
You now have a fully featured dev environment without installing anything else on the host system.
[!IMPORTANT] Each image might have a different default user. Be sure to check the remoteUser setting in .devcontainer/devcontainer.json and adjust any paths that depend on the user, such as volume mounts.
See .devcontainer/devcontainer.json for the current image and available configuration options. You can switch to different base images by editing this file.
The environment is defined by three small files:
These files are generated from the templates in templates/devcontainer/ (this repo's copy is pre-filled for the name devmagic; regenerate it with ./setup/generate.sh after editing the templates). Rebuild the container for changes to take effect.
The devcontainer includes:
Use this repo as a personal dev terminal/workstation.
Whenever you need to work on another repo:
git clone https://github.com/other/repo.git
cd repo
code .Each cloned repo automatically uses the same dev container setup.
This makes DevMagic a portable coding box you can carry between machines or use on a fresh OS in minutes.
The dev container is the only service that starts by default. .devcontainer/docker-compose.yml ships with a commented PostgreSQL example showing the pattern for adding more services: define the service, attach it to dev-network, and put it behind a Compose profile so it only runs when you ask for it.
To use one:
Uncomment (or add) the service in .devcontainer/docker-compose.yml.
Start and stop it on demand:
docker compose -f .devcontainer/docker-compose.yml --profile postgres up -d
docker compose -f .devcontainer/docker-compose.yml --profile postgres downRun this from the host at the project root.
Connect from the dev container using the service name as hostname (e.g. postgres:5432) — both containers share dev-network. docker ps shows everything running side by side, and stopping a service never affects your dev container.
If you want to contribute to this repository (including the devmagic.run website in the www folder):
Clone this repository:
git clone https://github.com/marcelocra/devmagic.git
cd devmagicOpen the repository in VS Code and choose "Reopen in Container"
For website development:
cd www
pnpm install
pnpm run devSee CONTRIBUTING.md for detailed contribution guidelines.
DevMagic mounts your personal dotfiles from the host into the container, keeping container infrastructure separate from personal preferences.
How it works:
Don't keep dotfiles at ~/.config/dotfiles? Adjust (or remove) the mount in .devcontainer/docker-compose.yml. If the folder doesn't exist on the host, Docker just creates it empty — harmless.
Your dotfiles' shell/init.sh (if you use the setup script) should be idempotent (safe to source multiple times).
For full details, see docs/ARCHITECTURE.md or devmagic.run/docs.
| Back | FazBrowse Home | New Git URL |