Command: config
Description
The config command regenerates the avangclirc.json file in the current project directory, automatically detecting the existing Next.js project configuration. This is useful if the configuration file has been deleted or if you want to update it after manual changes.
Syntax
avangcli configWhat Does the Command Do?
The command analyzes the current project and detects:
1. Package Manager
- Checks for lock files:
yarn.lock→yarnpnpm-lock.yaml→pnpmbun.lock→bun- Otherwise →
npm
2. Tailwind CSS
- Searches for
tailwindcssindependenciesordevDependencies - Checks for existence of
tailwind.config.jsortailwind.config.ts
3. Linter/Formatter
biome.jsonpresent →biome- ESLint files present (
.eslintrc.js,eslint.config.js, etc.) →eslint-prettier - Otherwise →
none
4. Docker
docker-compose.dev.ymlanddocker-compose.prod.yml→both- Only
docker-compose.dev.yml→dev - Only
docker-compose.prod.yml→prod - None →
none
5. UI Library
@mui/materialpresent →muicomponents.jsonpresent →shadcn@heroui/reactpresent →heroui- None →
none
6. Git Setup
huskyindevDependenciesor.huskydirectory presentcommitlint.config.jspresent →true- Otherwise →
false
7. Project Validation
- Verifies that
package.jsonexists - Confirms that
nextis independenciesordevDependencies
Usage Examples
Example 1: Regenerate Configuration
cd my-nextjs-project
avangcli configExample 2: After Manual Changes
# You manually added Docker
echo "I added docker-compose.yml"
avangcli config # Updates avangclirc.jsonGenerated File
Creates avangclirc.json in the project root:
{
"packageManager": "bun",
"tailwind": true,
"linterFormatter": "eslint-prettier",
"docker": "both",
"uiLibrary": "heroui",
"gitSetup": true
}Requirements
- You must run the command within a valid Next.js project directory
- The project must have
package.jsonwith Next.js installed - The
avangclirc.jsonfile will be overwritten if it exists
Next Steps After Config
Once the file is regenerated:
# Verify configuration
cat avangclirc.json
# Use other commands that depend on config
avangcli module my-moduleTips and Notes
Note on Automatic Detection
Detection is based on present files and dependencies. If you installed something manually but it doesn't appear in package.json, it might not be detected.
Custom Configuration
If you need a specific configuration that isn't automatically detected, edit avangclirc.json manually after regenerating it.
Invalid Project
If you run config outside a Next.js project, you will receive an error.
Troubleshooting
Error: "No package.json found"
Cause: You're not in a project directory
Solution:
cd my-nextjs-project
avangcli configError: "This doesn't appear to be a Next.js project"
Cause: The project doesn't have Next.js installed
Solution:
# Check installation
cat package.json | grep next
# Install if missing
npm install next
avangcli configError: "Failed to write project config"
Cause: Permission issues
Solution:
# Linux/Mac
chmod 755 .
avangcli configConfiguration Not Detected Correctly
Cause: Manual changes not reflected in standard files
Solution:
# Check dependencies
npm list tailwindcss # For Tailwind
npm list @heroui/react # For HeroUI
# Regenerate
avangcli configRelated Resources
Last updated: 9/22/2026