> ## Documentation Index
> Fetch the complete documentation index at: https://site.aspect.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Start a new Bazel project with aspect init

> aspect init is now a native Aspect CLI command, and the language starter templates live at github.com/aspect-starters with a Use this template button.

export const BlogPost = ({title, date, authors, tags, image, children}) => {
  const tagList = tags ? tags.split(", ").filter(Boolean) : [];
  const tagSlug = t => t.toLowerCase().replace(/&/g, "").replace(/\+/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
  const formattedDate = date ? new Date(date + "T00:00:00").toLocaleDateString("en-US", {
    year: "numeric",
    month: "long",
    day: "numeric"
  }) : "";
  return <section className="w-full flex justify-center px-4 py-12 md:py-16">
      <div style={{
    maxWidth: "800px",
    width: "100%"
  }}>
        {image && (typeof image === "string" ? <img noZoom src={image} alt={title} className="w-full rounded-xl mb-8" style={{
    maxHeight: "400px",
    objectFit: "cover"
  }} /> : <div className="blog-post-hero-image">{image}</div>)}
        <h1 className="text-3xl md:text-4xl font-bold text-zinc-900 dark:text-white">
          {title}
        </h1>
        <div className="flex flex-wrap items-center gap-3 mt-4 text-sm text-zinc-500 dark:text-zinc-400">
          {authors && <span>{authors}</span>}
          {authors && formattedDate && <span>·</span>}
          {formattedDate && <span>{formattedDate}</span>}
        </div>
        {tagList.length > 0 && <div className="flex flex-wrap gap-2 mt-3">
            {tagList.map(tag => <a key={tag} href={"/blog/tags/" + tagSlug(tag)} className="px-2 py-0.5 rounded-full text-xs bg-zinc-100 dark:bg-zinc-800 text-zinc-600 dark:text-zinc-400 hover:bg-blue-100 dark:hover:bg-blue-900/40 hover:text-blue-700 dark:hover:text-blue-300 transition">
                {tag}
              </a>)}
          </div>}
        <hr className="my-8 border-zinc-200 dark:border-zinc-700" />
        <div className="prose dark:prose-invert max-w-none">{children}</div>
      </div>
    </section>;
};

export const MarketingPage = () => <div className="marketing-page-marker" style={{
  display: "none"
}} />;

export const Section = ({children, className = "", gray = false, dark = false, id}) => <section id={id} className={`w-full flex justify-center px-4 py-16 md:py-24 ${gray ? "bg-gray-50 dark:bg-zinc-900" : dark ? "bg-zinc-900 dark:bg-zinc-950" : ""} ${className}`}>
    <div className="w-full" style={{
  maxWidth: "1140px"
}}>
      {children}
    </div>
  </section>;

<MarketingPage />

<BlogPost title="Start a new Bazel project with aspect init" date="2026-06-14" authors="Greg Magolan" tags="Bazel, Aspect CLI">
  <img noZoom src="https://mintcdn.com/aspectbuild/x1L7Iep716jCyJVo/images/blog/hashnode/hn-b7f01104a1.jpeg?fit=max&auto=format&n=x1L7Iep716jCyJVo&q=85&s=558844bd2581ad93d62fbed4b786ab1d" alt="" className="blog-post-cover" width="1600" height="1067" data-path="images/blog/hashnode/hn-b7f01104a1.jpeg" />

  Standing up a Bazel workspace takes more boilerplate than
  it should. `.bazelversion`, `.bazelrc` with sane flags, toolchains,
  formatting and linting wiring, package-manager wiring, and CI that *maybe works*. It's a rite of passage no one asked for.
  So we packed the whole setup into a single command.

  ## `aspect init` is now built into the CLI

  `aspect init` is a native [Aspect CLI](/docs/cli) command (requires
  [v2026.25.11](https://github.com/aspect-build/aspect-cli/releases/tag/v2026.25.11)
  or newer). No separate tool, nothing to download by hand. Just install the CLI and run:

  ```bash theme={null}
  aspect init my-project --preset go
  cd my-project
  aspect build //...
  ```

  That's it. You have a fresh bazel setup.

  Omit `--preset` and you get an interactive picker. Available presets: `minimal`, `shell`, `go`, `js`, `py`, `java`, `kotlin`, `cpp`, `rust`, `ruby`,
  `scala`, and `kitchen-sink` (every language plus OCI containers, protobuf, and
  release stamping).

  What generated project comes wired up:

  * 🧱 The latest Bazel (bzlmod) with curated flags via [`bazelrc-preset.bzl`](https://github.com/bazel-contrib/bazelrc-preset.bzl)
  * 🧰 A hermetic dev environment via [`bazel_env.bzl`](https://github.com/buildbuddy-io/bazel_env.bzl) and [`rules_multitool`](https://github.com/theoremlp/rules_multitool)
  * 🎨 Formatting and linting with [`rules_lint`](https://github.com/aspect-build/rules_lint)
  * 📦 Native package-manager integration for the chosen languages
  * ⚙️ Working GitHub Actions CI that runs `aspect build`/`test`/`lint`/`format` on ephemeral runners
  * 📌 A pinned Aspect CLI version so your whole team and CI use identical tooling.

  ## The template repos, if you prefer

  Each preset is also published as a GitHub *template repository* under
  [github.com/aspect-starters](https://github.com/aspect-starters). Go to the
  language you want — say [aspect-starters/go](https://github.com/aspect-starters/go) —
  and hit **Use this template** button (or fork it, or just `git clone`).

  Super handy if you want a playground, a training repo, or a link to
  send to the next person who asks "how do I set up Bazel for X?"

  Building a polyglot monorepo? `aspect init --preset kitchen-sink` or start from
  [aspect-starters/kitchen-sink](https://github.com/aspect-starters/kitchen-sink).

  ## One source of truth

  The CLI command and the template repos render from the same templates, so they
  never drift. The source of truth is
  [aspect-build/aspect-workflows-template](https://github.com/aspect-build/aspect-workflows-template):
  CI there renders and builds every preset before anything lands, then republishes the
  `aspect-starters` repos on each release.

  Found a rough edge or want to improve a template? File issues and PRs there.

  This replaces the older wizard-based `init` (which relied on an external
  scaffolding tool) and Aspect's previous starter repos. Same idea, much better execution,
  and now it's part of our CLI.

  [Install the Aspect CLI](/docs/cli/install) and run `aspect init`.
</BlogPost>
