Current section
Files
Jump to
Current section
Files
mix.exs
defmodule CmdcTui.MixProject do
use Mix.Project
@version "0.1.0"
@source_url "https://github.com/tuplehq/cmdc"
@description "CMDC TUI — 基于 ExRatatui 的 AI Agent 终端交互界面"
def project do
[
app: :cmdc_tui,
version: @version,
elixir: "~> 1.17",
start_permanent: Mix.env() == :prod,
deps: deps(),
description: @description,
package: package(),
source_url: @source_url,
dialyzer: [
plt_add_apps: [:mix],
ignore_warnings: ".dialyzer_ignore.exs"
]
]
end
def application do
[
extra_applications: [:logger],
mod: {CmdcTui.Application, []}
]
end
defp deps do
[
cmdc_dep(),
{:ex_ratatui, "~> 0.5.1"},
{:ex_doc, "~> 0.35", only: :dev, runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false}
]
end
# 开发时用本地 path,hex.build/publish 时用 hex 版本
defp cmdc_dep do
if System.get_env("HEX_BUILD") || Mix.env() == :hex do
{:cmdc, "~> 0.1"}
else
if File.exists?("../mix.exs") do
{:cmdc, path: ".."}
else
{:cmdc, "~> 0.1"}
end
end
end
defp package do
[
name: "cmdc_tui",
description: @description,
licenses: ["Apache-2.0"],
links: %{
"GitHub" => @source_url,
"CMDC" => "https://hex.pm/packages/cmdc",
"Commercial Licensing" => "#{@source_url}#license"
},
maintainers: ["CMDC Team"],
files: ~w(lib mix.exs README.md CHANGELOG.md LICENSE)
]
end
end