You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: generate.rs
    path of file: ./repos/chiselstrike/cli/src/cmd
    
    the code of the file until where you have to start completion: use crate::proto::chisel_rpc_client::ChiselRpcClient;
use crate::proto::{type_msg::TypeEnum, DescribeRequest};
use crate::proto::{FieldDefinition, TypeDefinition, TypeMsg, VersionDefinition};

use anyhow::{anyhow, Context, Result};
use serde::Deserialize;
use serde_json::json;
use std::collections::HashMap;
use std::fmt::Write as _;
use std::fs::File;
use std::io::Write as _;
use std::path::{Path, PathBuf};
use tokio::fs::create_dir_all;

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Mode {
    Node,
    Deno,
}

#[derive(Debug)]
pub struct Opts {
    pub server_url: String,
    pub api_addr: String,
    pub output_dir: PathBuf
    
fn generate_client_lib(opts: &Opts) -> Result<String> {
    let mut output = String::new();
    let imports = match opts.mode {
        Mode::Deno => {
            r#"
            import { type FilterExpr } from "./filter.ts";
            import * as reflect from "./reflection.ts";
            import { type ΩWithoutId as WithoutId } from "./models_without_id.ts";
        "#
        }
        Mode::Node => {
            r#"
            import { type FilterExpr } from "./filter";
            import * as reflect from "./reflection";
            import { type ΩWithoutId as WithoutId } from "./models_without_id";
        "#
        }
    };
    write!(output, "{}\n\n", &imports)?;
    write!(output, "{}", include_str!("generate_src/client_lib.ts"))?;
    Ok(output)
}