Skip to content

How the Init Command Works

The init command copies a Devsync template to your current directory, setting up everything you need to start building your portfolio.

  1. Check for template flag: First, it checks if the --template flag is provided. If it is, the command splits the string by / and cleans it up.

  2. Clone the repository: If the --template flag is not provided, it clones the default template: https://github.com/jannael/devsync-default-template.

  3. Clean Git history: Deletes the .git directory to ensure a clean Git history, separate from the template’s history.

  4. Initialize new repository: Initializes a new Git repository and makes the first commit, allowing you to add your own remote origin.

After running init, you’ll have:

  • DEVSYNC.json - Your portfolio configuration
  • Template source files - Your portfolio code
  • GitHub Actions workflow - Auto-updates on DEVSYNC.json changes
  • Agent skills - AI helper for portfolio operations
  1. Create a GitHub repository with your username
  2. Add remote origin: git remote add origin https://github.com/[username]/[username].git
  3. Push your changes: git push -u origin main
  4. Fill in DEVSYNC.json with your information
  5. Push to see your portfolio update automatically